I'm having a hard time getting this code to work here.
Code:
inStorage = False
inStorage = inStorage Or Me.cboEquipmentStatus.Value = 2
If inStorage _
Or Not IsNull(Me.cboEquipmentModelNum.Value) Or Not (Me.cboEquipmentModelNum.Value) = "" _
Or Not IsNull(Me.txtSerialNum.Value) Or Not (Me.txtSerialNum.Value) = "" Then
'Do stuff here
End If
Basically I have If (positive) in storage Or Not (negative) ModelNum Or Not (negative) SerialNum. In the past, I've re-wrote my code to not use "or not" and to just use "or". But it doesn't seem like I can do that for what I need it to do.
For now I have a msgBox which displays after then. I need the msgBox to display if all three criteria is met. That is,
Equipment Status is 2
cboEquipmentModelNum is not null
txtSerialNum is not null.
The problem is, I'm getting the msgBox whether value are null or not. What am I doing wrong?