Click to See Complete Forum and Search --> : VB DdataEnvironment


simonkwan
December 20th, 1999, 12:25 AM
Hi, I have a dataenvironment like this :

dataenvironment1
mydatabase
mycustomerTable

''''''''''''''''''''''''''''''''''''''''''
Sub form_load()
if dataenvironment1.rsmycustomerTable.eof then
cmdtop.enabled = false
cmdprevious.enabled = false
cmdnext.enabled = false
cmdbottom.enabled = false
end if
end sub




In my form_load(), I want to check whether the table is empty or not. The navigation button will be disabled if the table is empty. But the form_load() do not understand dataenvironment1.
How can I do that ?
Than you !

Dr_Michael
December 20th, 1999, 01:51 AM
Add this code at the form load event:

YourConnection.open




Michael Vlastos
Automation Engineer
Company SouthGate Hellas SA
Development Department
Athens, Greece

Mikesc
December 20th, 1999, 09:02 AM
Try placing your code in the form_activate event. On form_load the components on the form may still be getting loaded into memory...