Incrementing an ID field
- From: NBH636 <NBH636@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 8 Sep 2005 06:47:19 -0700
I am setting up an application for an existing SQL database using Access to
update/enter new records. When I enter new records on any of the forms I want
to get Access to calculate the next ID no ie if the last was 1256 then I want
Access to insert the value 1257 into the ID field when I go to a new record.
The SQL statement I would run in SQL would be ' User_ID = (Select
Max(user_ID) +1)' on the appropriate table. I don't know which Event to put
the statement in on or whethermy code is correct.
Can anyone help me?
Drew
.
- Follow-Ups:
- Re: Incrementing an ID field
- From: RuralGuy
- RE: Incrementing an ID field
- From: Klatuu
- Re: Incrementing an ID field
- Prev by Date: RE: What's Wrong with this Code
- Next by Date: Re: Open Report with criteria in VBA
- Previous by thread: Open Report with criteria in VBA
- Next by thread: RE: Incrementing an ID field
- Index(es):
Relevant Pages
|