The user needs to create a new order. To allow this, we have a button that opens the order form to a blank record in the Order table:
DoCmd.OpenForm "frmOrder", , , , acFormAdd
The form comes up and is ready to go. But the new Order ID number displays (New)
. That field is an autonumber. When I make an entry anywhere on the form, (New)
is replaced by the ID number. But I want it right away.
I figure it's because the new record is not committed. Can I make an initial commit so the primary key is displayed upon opening?
I tried using RunCommand acCmdSaveRecord
to force a commit in the Form_Load()
event, but no success.