Hi..I have created an "Add new Record" command button on a form and it doesn't work. It adds the records to the table, but they do not show up in the form view after I close and restart Access. They will not come up on a record search in the form either. I can, however, add a new record by using the record navigation buttons at the bottom of the form. The form has subforms in it, but the command button is part of the main form and not the subforms. I cannot figure out what the problem is. I have a similar database that I used the "Add New Record" command button on and it works fine. The code for both appear identical:
Private Sub cmdAddPatient_Click()
On Error GoTo Err_cmdAddPatient_Click
DoCmd.GoToRecord , , acNewRec
Exit_cmdAddPatient_Click:
Exit Sub
Err_cmdAddPatient_Click:
MsgBox Err.Description
Resume Exit_cmdAddPatient_Click
End Sub
I'd appreciate any ideas anyone has...thanks!
Private Sub cmdAddPatient_Click()
On Error GoTo Err_cmdAddPatient_Click
DoCmd.GoToRecord , , acNewRec
Exit_cmdAddPatient_Click:
Exit Sub
Err_cmdAddPatient_Click:
MsgBox Err.Description
Resume Exit_cmdAddPatient_Click
End Sub
I'd appreciate any ideas anyone has...thanks!