Minggu, 22 November 2015

Re: [MS_AccessPros] Primary key value for new record

 

Steve-

What is the code you're using to do the insert? If you use a recordset and the AddNew method, you can grab the new Autonumber value as soon as you set the value of the first field.

John Viescas

Sent from my iPad

On Nov 22, 2015, at 13:58, Steve thaw5@suddenlink.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

I have a form procedure triggered by a command button which inserts a
new record into a table. The primary key for that table is an
AutoNumber. Later in the same procedure I need the value of the new
record's key. How can I get the value of the primary key? Thanks.

Steve

------------------------------------
Posted by: Steve <thaw5@suddenlink.net>
------------------------------------

------------------------------------

Yahoo Groups Links

__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar