How do I show a Message Box dependant on conditions in previous Re

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dataentry form includes fields MemberID, Verbal Warning, Written Warning.
When an entry into Verbal Warning (yes/no) field is attempted then a Message
Box should pop up containing the words "Verbal Warning previously Issued.
This Warning should be Written" This is IF a previous record exists for this
MemberID with the Verbal Warning box checked. If no such record exists the
Message box should not appear.
 
Use the Before Update event of the Verbal Warning check box:

If me.chkVerbalWarning = True Then
If Nz(DLookup("[VerbalWarning]", "MyTableName", "[MemberID] = " _
& Me.txtMemberId), 0) = True Then
MsgBox "This Jerk is a ScrewUp, Slap the Crap Out of Him"
Cancel = True
End If
End If
 
Wonderful Klatuu,
It works like a charm and now I better understand the Before Update Event.
Thank you so much for that and for your prompt response

Klatuu said:
Use the Before Update event of the Verbal Warning check box:

If me.chkVerbalWarning = True Then
If Nz(DLookup("[VerbalWarning]", "MyTableName", "[MemberID] = " _
& Me.txtMemberId), 0) = True Then
MsgBox "This Jerk is a ScrewUp, Slap the Crap Out of Him"
Cancel = True
End If
End If


Kiwi Bill said:
Dataentry form includes fields MemberID, Verbal Warning, Written Warning.
When an entry into Verbal Warning (yes/no) field is attempted then a Message
Box should pop up containing the words "Verbal Warning previously Issued.
This Warning should be Written" This is IF a previous record exists for this
MemberID with the Verbal Warning box checked. If no such record exists the
Message box should not appear.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top