Opening a new record form but allowing searches

  • Thread starter Thread starter Fallout
  • Start date Start date
F

Fallout

I changed the "Data Entry to Yes" to have my forms open for new records, but
it seems to have disabled my ability to move from record to record or allow
for searches. Is there another way that I could have set it up so that it
allows for both?
 
I changed the "Data Entry to Yes" to have my forms open for new records, but
it seems to have disabled my ability to move from record to record or allow
for searches. Is there another way that I could have set it up so that it
allows for both?

That's what Data Entry does.

You can get the best of both by putting a line of code or a macro in the
form's Load event to move to the new record:

Private Sub Form_Load()
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
End Sub
 
Please forgive me for being so bold as to this response. I am not that great
at VBA, but I just used the Button Wizard, and got this code; it closes the
form and reopens it in data entry mode. Thanks for letting me intercede.

Private Sub ButtonAddNewRecord_Click()
On Error GoTo Err_ButtonAddNewRecord_Click

DoCmd.GoToRecord , , acNewRec

Exit_ButtonAddNewRecord_Click:
Exit Sub

Err_ButtonAddNewRecord_Click:
MsgBox Err.Description
Resume Exit_ButtonAddNewRecord_Click

End Sub
 
Back
Top