query problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeroen van vliet

    #1

    query problem

    Hello i have a query, that filters s specific field with a specicfic value
    in a textbox like this:

    strSQL = "SELECT * FROM Remarks where Lidcode <> ´" & txtLidcode.Text & " ´
    "

    well, the proplem is when someone types 5000 in the textbox txtLidcode, then
    the rows where Remarks are 5000, will be not selected. But if some cells in
    Remakrs are empty, then it doesnt select then as well. Why?? I want that
    everthing will be selected except the 5000 remarks, also the empty fields.

    Why doesnt this work?


  • Pieter Linden

    #2
    Re: query problem

    > Why doesnt this work? - wrong syntax...

    strSQL = "SELECT * FROM Remarks where Lidcode <> ´" & txtLidcode.Text
    & " ´ OR LidCode IS NULL"

    Comment

    Working...