I have a scenario where I need two conditions in an IF statement to show the same result.
i.e:
IF Condition 1 = something AND Condition 2 = Anything
txtMessage = "Hello world."
Else
txtMessage = "Goodbye world.
Condition 1 being the 'Tag' option for controls in Access, and Condition 2 being the text in the control such as "N/A".
I know in Java you can use && to declare this, but how can I do this in VBA? I've checked out similar questions in the forums and Google but couldn't find an answer for this. Other people suggest using elseif statements, but there should be a way to declare two conditions which result in the same thing in one line, no? Am I over-looking something simple here, or is this the wrong way to look at it?
EDIT
Here is a snippet of the code I am using
If ctrl.Tag = "BlkChk" Then
If IsNull(ctrl) Then
strMsg = strMsg & "- " & ctrl.Name & vbCrLf
End If
End If
Basically, I would like this code to check if the control is either blank, or contains the text "N/A" If so, print the text " Hello World." If not, print the text "Goodbye world."