Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can i get autonumber id with access?
Message
General information
Forum:
Visual Basic
Category:
Access
Title:
Can i get autonumber id with access?
Miscellaneous
Thread ID:
00506327
Message ID:
00506327
Views:
57
hi all -

i'm currently using vb6 and msaccess97. i'm basically using recordsets for all my data manipulation since there are so many joins. the main table 'participant' has a unique key field that is autonumbered. i creat an empty recordset, load the data information, save it and try to get the generated id, it comes up empty. however, all the other data that i have loaded is available for me to see. the autonumber [participant_id] is empty.

here is some of my pseudo code
 dim i as integer

 RecordSet.AddNew
 RecordSet!Field1 = "some text"
 RecordSet.Update
 
 i = RecordSet!participant_id
"i" is empty but when i go into access i can see that there is a number that has been assigned. how do i find out what id number i just added? i use this value throughout the rest of the application and need it. according to one of my reference books, wrox ado2.6 programmers reference, it should work but i am not using ado2.6. i think my version is ado2.5 library ?? the dll is msado15.dll so i'm not sure but the text that displays the available references says ado 2.5 lib.

any help would be much appreciated. thanks

piper
Next
Reply
Map
View

Click here to load this message in the networking platform