Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add entry despite autonumber

Status
Not open for further replies.

illuzioner

Technical User
Dec 15, 2002
44
0
0
US
Hi,

I have a table that has an autonumber field and many relationships with other tables, but it is the 'primary' table.

I need to add an entry where I need to make the autonumber field a specific value. How can I add to an entry to my table and get around the autonumber thing? The field is also the primary key.

Thanks!

Lou
 
Autonumbers are not meant to be visible to the user. If you need the user to be able to "fix" the primary key, then either
A> Create a "fake" primary key which the user can modify and keep the autonumber as the real primary key, hidden from view, or
B> replace the Autonumber with an Integer value they can modify at will.

I'd recommend <A>.


Either way, you can't go back and &quot;enter in&quot; an autonumber field. If you want your next autonumber to be the next consecutive number in the list, you can compact the database and it will &quot;reset&quot; the next autonumber to Max(ID) + 1. --
Find common answers using Google Groups:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top