Where SQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chuckzter
    New Member
    • Oct 2007
    • 56

    Where SQL

    Hey guys,

    I have a table in microsoft access, with the fields course,yearlvl and semester.
    My question is, what is the sql statement if i want to search for the exact row where all the said fields match with values that i enter on textboxes in vb.

    Here is my code:

    rs.Open "Select *from subjects where course = '" & Combo1.Text & "' AND semester = '" & Combo3.Text * "'", CONN, adOpenDynamic, adLockOptimisti c

    The error i get is, "Type Mismatch"
    I am using vb 6.0.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    I'll take a stab in the dark and say at least one of your fields is a numeric type. If so, don't put 'quotes' around the search value.

    Comment

    • chuckzter
      New Member
      • Oct 2007
      • 56

      #3
      Never mind, my groupmate found a way to establish a pointer.

      Thanks for the reply though. :)

      Comment

      Working...