vb6, sp5. access 2000, sp3.
I have a table with teh key defined as autonumber.
i use a sql insert statement to insert the record into the record set.
how do i get the keyvalue of the record that i just inserted?
i sincerely appreciate your time and consideration.
Woody
any sugestion or comment made by me should be examined first for
validity and appropriateness before assuming i have any idea at all
what the heck i am talking about. I am not responsible for anything you
may see with my name attached to it, i think.
Try adding:
rst.Open "SELECT @@IDENTITY"
lngID = rst(0).Value
immediately after your Insert statement.
--
Al Reid
"It ain't what you don't know that gets you into trouble. It's what you know
for sure that just ain't so." --- Mark Twain
> vb6, sp5. access 2000, sp3.
>
[quoted text clipped - 13 lines]
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
Woody - 31 Oct 2003 13:58 GMT
thanx, works like the proverbial champ!
Woody
any sugestion or comment made by me should be examined first for
validity and appropriateness before assuming i have any idea at all
what the heck i am talking about. I am not responsible for anything you
may see with my name attached to it, i think.