Option Compare Database
Private Sub close_Click()
On Error GoTo Err_close_Click
DoCmd.close
Exit_close_Click:
Exit Sub
Err_close_Click:
MsgBox Err.Description
Resume Exit_close_Click
End Sub
Private Sub Save_Click()
On Error GoTo Err_Save_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Exit_Save_Click:
Exit Sub
Err_Save_Click:
MsgBox Err.Description
Resume Exit_Save_Click
End Sub
Private Sub Search_Click()
On Error GoTo Err_Search_Click
Screen.PreviousControl.SetFocus
DoCmd.FindNext
Exit_Search_Click:
Exit Sub
Err_Search_Click:
MsgBox Err.Description
Resume Exit_Search_Click
End Sub
Private Sub Find_Record_Click()
On Error GoTo Err_Find_Record_Click
Screen.PreviousControl.SetFocus
DoCmd.FindNext
Exit_Find_Record_Click:
Exit Sub
Err_Find_Record_Click:
MsgBox Err.Description
Resume Exit_Find_Record_Click
End Sub
Private Sub Find_Record_Now_Click()
On Error GoTo Err_Find_Record_Now_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Find_Record_Now_Click:
Exit Sub
Err_Find_Record_Now_Click:
MsgBox Err.Description
Resume Exit_Find_Record_Now_Click
End Sub
Private Sub Add_a_New_Record_Click()
On Error GoTo Err_Add_a_New_Record_Click
DoCmd.GoToRecord , , acNewRec
Exit_Add_a_New_Record_Click:
Exit Sub
Err_Add_a_New_Record_Click:
MsgBox Err.Description
Resume Exit_Add_a_New_Record_Click
End Sub
Private Sub Find_a_Record_Click()
On Error GoTo Err_Find_a_Record_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Find_a_Record_Click:
Exit Sub
Err_Find_a_Record_Click:
MsgBox Err.Description
Resume Exit_Find_a_Record_Click
End Sub
Private Sub Find__Record_Click()
On Error GoTo Err_Find__Record_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Find__Record_Click:
Exit Sub
Err_Find__Record_Click:
MsgBox Err.Description
Resume Exit_Find__Record_Click
End Sub
John W. Vinson said:
where do I find the codes?
Open the form in design view. View its Properties. View the properties of the
command button; on the "Events" tab see what's in the Click event. If it says
[Event Procedure] click the ... icon by it to open the VBA editor, and copy
and paste the text there to a message here.
Is there anyway we can talk on the phone?
If you're willing to discuss a paid consulting arrangement; sorry, but not for
free.