Quick If Or Then question

morlan

Registered User.
Local time
Today, 16:59
Joined
Apr 23, 2003
Messages
143
I want to run an event if the column value for a combo is 27 or 39 or 40 etc.
I've tried the following but it doesn't work. Could someone point me in the right direction?

If Me.cmbAppCriteria1.Column(0) = "27" Or "39" Or "40" Or "48" Then
 
morlan said:
I want to run an event if the column value for a combo is 27 or 39 or 40 etc.
I've tried the following but it doesn't work. Could someone point me in the right direction?

If Me.cmbAppCriteria1.Column(0) = "27" Or "39" Or "40" Or "48" Then


Code:
If Me.cmbAppCriteria1.Column(0) = "27" Or Me.cmbAppCriteria1.Column(0) = "39" Or Me.cmbAppCriteria1.Column(0) = "40" Or Me.cmbAppCriteria1.Column(0) = "48" Then


OR, even better:

Code:
Select Case Me.cmbAppCriteria1.Column(0)
    Case Is = "27", "39", "40", "48"
        [i]do stuff[/i]
    Case Else
        [i]do other stuff[/i]
End Select
 
OK, thanks
 

Users who are viewing this thread

Back
Top Bottom