R
rebecky via AccessMonster.com
This seems like such a simple, basic thing, but I cannot get it quite right.
I have an employer form(main form) with a position posting(subform). I have
added a "cut" command button and just want it to display a msgbox telling the
user that if he/she is in the main form, he/she must use the "cut" button on
THAT form........otherwise the error msgbox will say "Nothing to cut!"
What have I done wrong?
On Error GoTo Err_Command241_Click
Screen.PreviousControl.SetFocus
RunCommand acCmdCut
Exit_Command241_Click:
Exit Sub
Err_Command241_Click:
If Screen.ActiveForm.Name = "EmployerPositions1" Then
MsgBox "You Must Use the Employer Cut Button to Cut Employer Information"
Else
MsgBox "Nothing to Cut!"
End If
Resume Exit_Command241_Click
Exit Sub
End Sub
I have an employer form(main form) with a position posting(subform). I have
added a "cut" command button and just want it to display a msgbox telling the
user that if he/she is in the main form, he/she must use the "cut" button on
THAT form........otherwise the error msgbox will say "Nothing to cut!"
What have I done wrong?
On Error GoTo Err_Command241_Click
Screen.PreviousControl.SetFocus
RunCommand acCmdCut
Exit_Command241_Click:
Exit Sub
Err_Command241_Click:
If Screen.ActiveForm.Name = "EmployerPositions1" Then
MsgBox "You Must Use the Employer Cut Button to Cut Employer Information"
Else
MsgBox "Nothing to Cut!"
End If
Resume Exit_Command241_Click
Exit Sub
End Sub