Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DISTRIBUTING DATABASES (mdb) WITH VB APPLICATIONS
Message
 
À
24/09/1999 20:41:31
John Vlahos
V I Software Solutions Design
Mississauga, Ontario, Canada
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00268835
Message ID:
00268849
Vues:
28
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform