Hello all, just a quick question. How would one use an AND statement with an IF statement in VBA?
Currently I have code to look at a table and see if there is a record in it, if there is then a msgbox gets sent to all users. I would like to add functionality to send to individual people so how could I add an AND to the IF statement to say if the table is not null AND the employee_number matches then send the message? Below is what i am using today...i hope this all made sense.
Thanks for any help!
Paul
Currently I have code to look at a table and see if there is a record in it, if there is then a msgbox gets sent to all users. I would like to add functionality to send to individual people so how could I add an AND to the IF statement to say if the table is not null AND the employee_number matches then send the message? Below is what i am using today...i hope this all made sense.
Code:
If Not IsNull(DLookup("[message]", "tblmessage")) Then
MsgBox DLookup("[message]", "tblmessage"), vbInformation
Thanks for any help!
Paul