help with query!

A

AAA

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!
 
J

Jon Spivey

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top