You have the literal text "schPN" in your SQL query. I don't think this is
what you wanted.
Try:
' schPN = Replace(Request.Form("schPN"), "'", "''")
schPN = "PRT"
strsql = "SELECT ... WHERE PrinterName LIKE '%" & schPN & "%'"
--
http://www.aspfaq.com/
(Reverse address to reply.)
"NetZeroUser" <> wrote in message
news:...
> Quick question for the NG.
>
> I have the following on my ASP page. SchPN is actually grabbed from a
text
> box, but here is what I am entering
>
> schPN = "PRT"
> strsql = "select PrinterModel, UserName, PrinterName, PrinterType,
> IP_Address from Printers where (PrinterName LIKE '%schPN%')"
>
> I would assume that this would pull all printers from my Access DB that
> contain the words PRT, but it doesn't.
>
> Any ideas?
> Thanks
>
>