Error Code 2105 - Add New Record from Button

  • Thread starter Thread starter jkoca
  • Start date Start date
J

jkoca

I have a form with a command button to add a new record, and also have the
standard navigation strip. The table I am adding to has required fields. If
I try to add the record from the navigation bar (>*) before I have completed
the required fields, I get a reasonable message which indicates the field
that is missing a value. If on the other hand, I try to add a records from
the button using the following little snippet...

DoCmd.GoToRecord , , acNewRec
Me!txtCommonName.SetFocus

I get an error 2105 telling me I can't go there.

I have a couple of questions...

Is there documentation on the various error codes ?

Why do these react differently. Do I need to perform some other step in the
VBA code ?

Whatever help you could provide would be appreciated.

Jim Koca
 
Bound or unbound form?
Why don't you try turning on the Access wizards and try
making a command button to move to a new record? That is
what I did when I got that error in a bound form in my
database. I haven't encountered that problem yet in my
unbound forms, though.

Bryan
Computer Systems Analyst
 
Back
Top