If Not Loop Syntax

Roey

Well-known member
Joined
Oct 10, 2002
Messages
238
Location
Canada
What is the correct syntax for testing if two combo boxes dont have text values in them


Works
--------

If Me.cboBox1.Text = "" And Me.cboBox2 = "" Then
Exit Sub
End If

..... Code

Fails
------

If Not Me.cboBox1.Text = "" And Me.cboBox2 = "" Then
.... Code

End If
 
I dont quite understand the question, you say the first method works, so in that case, thats the method to use.

The second method doesnt work because essentially I believe what it says is..

If CboBox1 is anything other than "" and CboBox2 is ""
 
Back
Top