G
Guest
I have Access 2003. I have a field named "Contents" in a table named
"Ticket". On one of my forms, I have a command button named
"cmdDocumentTicket" and when clicked, it'll add text to the "Contents" field
by pulling information from other fields in the table. Part of what it adds
are the words "Original Message From".
I need to write VBA code on the Exit command button so that when a user
clicks the Exit Button, it'll confirm the "Contents" field contains the text
"Original Message From" somewhere in the field. If it doesn't, I want it to
prompt them with a message.
Below is code I've started which won't work because I need help on it.
'Check to make sure ticket has been documented
If Me.Contents <> "No Solution Yet" Then
strMsg = strMsg & "Do not forget to document ticket"
MsgBox strMsg, vbExclamation, "Invalid Data"
Me.cmdDocumentTicket.SetFocus
End If
Thank you so much in advance!
"Ticket". On one of my forms, I have a command button named
"cmdDocumentTicket" and when clicked, it'll add text to the "Contents" field
by pulling information from other fields in the table. Part of what it adds
are the words "Original Message From".
I need to write VBA code on the Exit command button so that when a user
clicks the Exit Button, it'll confirm the "Contents" field contains the text
"Original Message From" somewhere in the field. If it doesn't, I want it to
prompt them with a message.
Below is code I've started which won't work because I need help on it.
'Check to make sure ticket has been documented
If Me.Contents <> "No Solution Yet" Then
strMsg = strMsg & "Do not forget to document ticket"
MsgBox strMsg, vbExclamation, "Invalid Data"
Me.cmdDocumentTicket.SetFocus
End If
Thank you so much in advance!