Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Number of records in 2nd reocrdset
Message
De
04/06/2002 19:33:31
 
 
À
04/06/2002 03:20:25
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00664339
Message ID:
00664775
Vues:
17
Hello friend!

You know, i'm always using the movelast method first, to get the record count

recordset1.movelast
allRec = recordset1.recordcount
it works fine

for 2nd recordset
recordset2.movelast
allRecProduct = recordSet2.recordcount
it returns -1.

Are you declaring the variables of long or integer type before using them?

when i populate a combo by 2nd recordset it works successfully. the code is
you can also use a variable that acts like a counter, like this:
Dim MyCounter As Integer
MyCounter = 0
do while not recordset2.eof
combo1.additem recordset2.fields("Name").value
MyCounter = MyCounter + 1
recordset.movenext
loop

I Hope this can help you my friend!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform