Single message box for multiple IF statements
Dim msg as String
msg = ""
If criteria1 then msg = msg & "Please enter a Client Name" & vbcrlf
if criteria2 then msg = msg & "Please enter a Sub Client" & vbCrLf
if critiera3 then msg = msg & "Please enter a file BarCode"
if msg < "" then
msgbox msg
End if
--
Regards,
Tom Ogilvy
"Simon" wrote in message
...
I have three separate IF statemnts. Currently when they
are true, the following code is executed:
First IF statement
MsgBox "Please enter a Client Name"
Cancel = True
Second IF statement
MsgBox "Please enter a Sub Client"
Cancel = True
Third IF statement
MsgBox "Please enter a File Barcode"
Cancel = True
This produces three message boxes.
Is it possible to have one message box that shows the
statements that are true.
|