Results 1 to 12 of 12

Thread: Why does this if statement not work?

Threaded View

  1. #3
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Why does this if statement not work?

    Perhaps you also need to Uppercase the Column(s) data as well eg.
    Code:
    strSQL = "SELECT * FROM Leads WHERE " & _
                "UPPER( [Company Name])      LIKE '%" & UCase(Text1.Text) & "%' OR " & _
                "UPPER( [Contact Name])      LIKE '%" & UCase(Text1.Text) & "%' OR " & _
                "UPPER( [Phone Number])      LIKE '%" & UCase(Text1.Text) & "%' OR " & _
                "UPPER( [Contact Number2])   LIKE '%" & UCase(Text1.Text) & "%' OR " & _
                "       [Mobile]             LIKE '%" & Text1.Text & "%'"
    Last edited by Doogle; Aug 16th, 2012 at 08:18 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width