R
rebecky via AccessMonster.com
I have this code in the before update event of a text box called
"PositionType" on a subform containing information about Positions, which is
in a Main Form containing information about employers. It works just fine
but I need to have a vbyesno msg box where if
they say yes they exit sub and are allowed to continue entering the position
and if they say no, then cancel and undo. I cannot figure out how to get the
"If vbyes exit sub" part into the expression.....
If Not IsNull(DLookup("[PositionType]", "JobOrderInfo", "[EmployerID] = " &
Me.EmployerID & " AND [Positiontype] = """ & Me.PositionType & """")) Then
MsgBox [Form_EmployerPositions1].Employer_Name & " Has An Existing
Posting For " & Me.PositionType & "Is This the Exact Same Position? If not,
continue adding, if so please just change the number of slots", vbYesNo, "TED
version 2.1"
Cancel = True
Me.Undo
End If
Can anyone help?
Thank you
"PositionType" on a subform containing information about Positions, which is
in a Main Form containing information about employers. It works just fine
but I need to have a vbyesno msg box where if
they say yes they exit sub and are allowed to continue entering the position
and if they say no, then cancel and undo. I cannot figure out how to get the
"If vbyes exit sub" part into the expression.....
If Not IsNull(DLookup("[PositionType]", "JobOrderInfo", "[EmployerID] = " &
Me.EmployerID & " AND [Positiontype] = """ & Me.PositionType & """")) Then
MsgBox [Form_EmployerPositions1].Employer_Name & " Has An Existing
Posting For " & Me.PositionType & "Is This the Exact Same Position? If not,
continue adding, if so please just change the number of slots", vbYesNo, "TED
version 2.1"
Cancel = True
Me.Undo
End If
Can anyone help?
Thank you