dbTalk Databases Forums  

Newbie question about primary key.

comp.database.ms-access comp.database.ms-access


Discuss Newbie question about primary key. in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Zalek Bloom
 
Posts: n/a

Default Newbie question about primary key. - 11-03-2003 , 09:54 PM






I defined a table with a primary key as AutoNumber.
Now I insert a row - is there a way to know the primary key value that
will be created without locking the table before insert?

Thanks,

Zalek

Reply With Quote
  #2  
Old   
John
 
Posts: n/a

Default Re: Newbie question about primary key. - 11-05-2003 , 09:31 PM






Perhaps you could explain better what you are trying to accomplish.
Programatically your primary key field is accessable - if you are
using vba you can use MoveLast on your recordset and get the value for
your primary key field by fieldname,

iKey = User_ID
iKey = iKey + 1

or whatever.

John
jobrien at acscience dot com

Zalek Bloom <ZalekBloom (AT) hotmail (DOT) com> wrote

Quote:
I defined a table with a primary key as AutoNumber.
Now I insert a row - is there a way to know the primary key value that
will be created without locking the table before insert?

Thanks,

Zalek

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.