adding a new record to a table from a form

O

OTWarrior

I have a form which shows select field from a table (showing all rows of
data), and have 2 buttons , one to edit, one to add.
The edit button works perfectly

DoCmd.OpenForm "frm_TRA_EditRoute", , , "[anRouteID]=" & Me.Text62.Value,
acFormEdit, , True

the add button does not.

DoCmd.OpenForm "frm_TRA_EditRoute", , , , acFormAdd

in edit mode, the form loads up with all of the details (the autonumber
correct, the combo boxes drawing in the correct data), however in add mode
the autonumber box is just blank (doesn't say "(Autonumber)" like it does on
the other forms when i add), and the combo boxes aren't pulling the data

Am I going about this from the wrong angle? should I be using "addrecord" or
code to that effect?

NB: the form's source is the table.

Any help on this would be great, as I have check my other forms and cannot
see what i have done differently.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top