hello!

In an ACCESS database I have a table with an autonumber
field, I need to know the value generated for the
autonumber field everytime I post a new record to the
table. How can I do that? I suposse this is a very basic
question but I'm new to access.
The database will be accessed by multiple users at the
same time and I cannot query the last record of the table
to find out the autonumber assigned for it's possible
that a new record has been entered by other user in the
meantime.
Please help me with this one!!

thanks in advance!

Re: help with query! by Jon

Jon
Thu Jan 15 13:18:35 CST 2004

Hi,
you could do
<%
YourConnection.execute("insert into...
set rs=YourConnection.execute("select @@identity")
response.write "new id is " & rs(0)
%>

--
Cheers,
Jon
Microsoft MVP - FP

"AAA" <anonymous@discussions.microsoft.com> wrote in message
news:0b8701c3db86$11410400$a601280a@phx.gbl...
> hello!
>
> In an ACCESS database I have a table with an autonumber
> field, I need to know the value generated for the
> autonumber field everytime I post a new record to the
> table. How can I do that? I suposse this is a very basic
> question but I'm new to access.
> The database will be accessed by multiple users at the
> same time and I cannot query the last record of the table
> to find out the autonumber assigned for it's possible
> that a new record has been entered by other user in the
> meantime.
> Please help me with this one!!
>
> thanks in advance!