SelectCase Error

JustPunkin

Registered User.
Local time
Today, 14:04
Joined
Jan 8, 2009
Messages
38
I've got this bit of code that is giving me a hard time.

Code:
If IsNull(Me.txtCustomer.Value) Then
    strCustomer = "Like '*'"
Else
    selectcase Me.frmCustName.Value
        Case 1
            strCustomer = "Like '" & Me.txtCustomer.Value & "*'"
        Case 2
            strCustomer = "Like '*" & Me.txtCustomer.Value & "*'"
        Case 3
            strCustomer = "Like '*" & Me.txtCustomer.Value & "'"
        Case 4
            strCustomer = "= '" & Me.txtCustomer.Value & "'"
    End Select
End If

I knew I would have issues when "selectcase" did not format itself as a function (I think that's the right word).

Any ideas why?
 
Put a space between the two words. It is SELECT CASE with a space.
 
:o Thanks. That was quick and easy.
 

Users who are viewing this thread

Back
Top Bottom