I have two sections of code
1: To create a new account
2: To open a form
I am new to code so as you will see a little stuck. How do I stich the following code together to make it one event, as apposed to two seperate, Sorry for my ignorance!
Private Sub Command57_Click()
On Error GoTo Err_Command57_Click
DoCmd.GoToRecord , , acNewRec
Exit_Command57_Click:
Exit Sub
Err_Command57_Click:
MsgBox Err.Description
Resume Exit_Command57_Click
End Sub
Private Sub Command103_Click()
On Error GoTo Err_Command103_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAccountNumberManagement"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command103_Click:
Exit Sub
Err_Command103_Click:
MsgBox Err.Description
Resume Exit_Command103_Click
End Sub
1: To create a new account
2: To open a form
I am new to code so as you will see a little stuck. How do I stich the following code together to make it one event, as apposed to two seperate, Sorry for my ignorance!
Private Sub Command57_Click()
On Error GoTo Err_Command57_Click
DoCmd.GoToRecord , , acNewRec
Exit_Command57_Click:
Exit Sub
Err_Command57_Click:
MsgBox Err.Description
Resume Exit_Command57_Click
End Sub
Private Sub Command103_Click()
On Error GoTo Err_Command103_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAccountNumberManagement"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command103_Click:
Exit Sub
Err_Command103_Click:
MsgBox Err.Description
Resume Exit_Command103_Click
End Sub