add record problems

I

iwasinnihon

I have a form with 8 fields on it. I also have a button that you can
press to add the information in the fields to the table. The button
has the code
DoCmd.GoToRecord , , acNewRec
The problem is that it is skipping one of the fields. Only 7 of the
fields information is being inserted into the table. How do I fix it
so that it will include all 8 fields?
 
R

Rick Brandt

iwasinnihon said:
I have a form with 8 fields on it. I also have a button that you can
press to add the information in the fields to the table. The button
has the code
DoCmd.GoToRecord , , acNewRec
The problem is that it is skipping one of the fields. Only 7 of the
fields information is being inserted into the table. How do I fix it
so that it will include all 8 fields?

First off, I hope you are aware that the only reason DoCmd.GoToRecord , ,
acNewRec is saving the record you were on is that records are always saved
when you leave them after you have made changes. The way you wrote that
could be intepretted to mean that you thought "go to new record" was somehow
doing more than it really is there.

Most likely one of your controls on the form is not bound to a field in the
table. Check the ControlSource property of each one. In order to be
"bound" to a field in the table you must have (only) the name of that field
entered in the ControlSource property.
 
Top