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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add new record

Status
Not open for further replies.

slatetm

Programmer
Mar 20, 2007
16
0
0
US
Its been a while since I've worked with Access and I'm having some problems on the simpliest thing.

I have a main form with a tab control. In the tab is a subform. I have a table connected to the subform that has an autonumber and several fields. I already have a few records in the table. I'm trying to do DoCmd.GoToRecord , , acNewRec to add a new record but it always creates the autonumber starting with 1 and then of course I get an error stating the number is duplicated. I tried eliminating the subform and putting the fields directly on the tab control but the same error happens.

Any help is appreciated. I'm sure its something small.

 
What happens if you try to create a record directly in the table ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I just tried. I have 4 records. It created the autonumber of 4 so it didn't insert it. I esc'd out and tried again, this time it used a 5. The last time I tried to insert by running the form it used a 3 so its like it started at 1 and has gradually counted up from 1 to 5, eventhough 1-4 already exist. It did the same thing yesterday, started at 1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top