vb sql query help

Discussion in 'MS Access' started by CaJack, Mar 22, 2007.

  1. CaJack

    CaJack New Member

    Joined:
    Mar 21, 2007
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    I'm having some trouble with this line of SQL...

    Code:
    "SELECT Ename, Enumber, Ecolour FROM TestTBL1 WHERE Tick = False and Region = " & myString
    I'm using it to query an access database and I've made everything else in vb.
    What I want the query to do is find the name(Ename), number(number) and colour(Ecolour) and if the happy tick box (tick) is unchecked and there region matches the user input (stored in myString) return the query. No errors seem to be poping up, but the code worked fine and returned some info before I added the "Tick = False". Can someone help me sort the statement out?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    What is the type of the field Tick in your access database.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice