Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DISTRIBUTING DATABASES (mdb) WITH VB APPLICATIONS
Message
 
To
24/09/1999 20:41:31
John Vlahos
V I Software Solutions Design
Mississauga, Ontario, Canada
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00268835
Message ID:
00268849
Views:
29
>To be more precise I get the error message described to you n my previous reply, when the following code is attempted to be executed, since the Gri is not bound to the database through the data control
>
>>
> If PARTS.Recordset.EOF = False Then <===Error generated at this point!
> PARTS.Recordset.MoveNext
> If PARTS.Recordset.EOF = True Then
> PARTS.Recordset.MovePrevious
> End If
> End If
><
>
>Thank you

Simply put call the Refresh method after changing the DatabaseName property so your code will look like this:

Private Sub Form_activate()
With Data1
Data1.DatabaseName = "D:\Program Files\Microsoft Visual Studio\VB98\Nwind.mdb"
Data1.Refresh
If Data1.Recordset.EOF = False Then
Data1.Recordset.MoveNext
If Data1.Recordset.EOF = True Then
Data1.Recordset.MovePrevious
End If
End If
End With
End Sub
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform