Open new form

P

Pass-the-reality

On my form, I set up a button (through wizard) for adding a new record. When
you select the "add new record" button, a new form comes up. However, an ID
number is not added until you actually type into the form. This causes a
problem when several associates have AutoNum listed in the field and not an
actually record number. Under the VB I have the below - Is there anything I
can add that once the New Record is selected, the ID number will update?

Private Sub Command74_Click()
On Error GoTo Err_Command74_Click


DoCmd.GoToRecord , , acNewRec

Exit_Command74_Click:
Exit Sub

Err_Command74_Click:
MsgBox Err.Description
Resume Exit_Command74_Click

End Sub
 
D

Dennis

Set the focus to the first editable field on the form and then set the dirty
property
e.g.
DoCmd.GoToRecord , , acNewRec
Me.FieldName.SetFocus
Me.Dirty = True
 

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

Similar Threads


Top