bgibsonIYD
Technical User
I have a form "Main Address" and another form "Registration". On the "Main Address" form I have a button cmdRegister that I would like to open the "Registration" form with. I would like both forms to have the same NAME ID field, and have it carried over from the Main Address form. (As if i'm entering a persons name and then press the command button to register that person for the conference. I dont want the registration form to go anywhere else). I have the following code:
Private Sub cmdRegister_Click()
On Error GoTo Err_cmdRegister_Click
If IsNull(Me![NAME ID]) Then
MsgBox "Enter contact's information before registering them."
Else
DoCmd.OpenForm "Registration", , , "[NAME ID] = " & Me.NAME_ID
End If
Exit_cmdRegister_Click:
Exit Sub
Err_cmdRegister_Click:
MsgBox Err.Description
Resume Exit_cmdRegister_Click
End Sub
Where am I going wrong here?
Beth
**Learning Access**
Private Sub cmdRegister_Click()
On Error GoTo Err_cmdRegister_Click
If IsNull(Me![NAME ID]) Then
MsgBox "Enter contact's information before registering them."
Else
DoCmd.OpenForm "Registration", , , "[NAME ID] = " & Me.NAME_ID
End If
Exit_cmdRegister_Click:
Exit Sub
Err_cmdRegister_Click:
MsgBox Err.Description
Resume Exit_cmdRegister_Click
End Sub
Where am I going wrong here?
Beth
**Learning Access**