|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Access
Hi,
How can I establish what the last record is that was added to a table in an access database? The reason I need to do is that i am adding a record to a database through code and i need to establish what the id fo that record is. so that i can insert the id in another table. Please help. m |
|
#2
|
|||
|
|||
|
PS. The table where i need to get the id from is not visible to the user.
|
|
#3
|
|||
|
|||
|
If you are using ado you can often get the recent ID immediately from your ado recordset.
Select @@identity works on many ms db's Select Max(id) will usually work but may occasionaly return the wrong id.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#4
|
|||
|
|||
|
Thanks so much it works.
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Access |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|