Searching Access DB?

Results 1 to 2 of 2

Thread: Searching Access DB?

  1. #1
    Join Date
    Dec 1969

    Default Searching Access DB?

    Ok question, I am trying to have a searchable access db. it searches the values it gets from a form a user fills out. In the form they choose less than which the value is &#060; or greater than which is &#062; or equal to which is =<BR><BR>When i go to the new page i assign the value request.form("fldvalue") to a variable<BR><BR>From there I do a sql search<BR><BR>SELECT * FROM table WHERE <BR><BR>that is where i want to put that value of the variable there to say if it is equal to, greater or less than. But when i do that it gives me an internal 500 error all the time. the only way it works is if i hardcode it in the string<BR><BR>SELECT * FROM table WHERE =/&#062;/&#060;<BR><BR>overall i have it like this<BR><BR> "SELECT * FROM table WHERE fld &#039;"&variable1&"&#039; &#039;"&variable2&"&#039;"<BR><BR>variable 1 is suppose to be the comparison from the fill out form the user chose and variable 2 is the actual value it is comparing against.<BR><BR>Please help hope this makes sense!

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Searching Access DB?

    try this<BR><BR>"SELECT * FROM table WHERE " & variable1 & "=&#039;" & variable2 & "&#039;"<BR><BR><BR>now i did the =<BR><BR><BR>wat you MAY need is LIKE<BR><BR>

Posting Permissions

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