-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Put single quotes around the Form value. E.g. (I got rid of those
pesky parentheses that Access likes to put into the WHERE clause):
tblSupport.Name = '" & Forms!frm_SupportFT!txtName & "' AND
Or you could add the PARAMETERS statement to your query (I got rid of
the table references & pesky parentheses for clarity's sake):
PARAMETERS Forms!frm_SupportFT!txtName Text;
SELECT Name, JobNo
FROM tblSupport
WHERE Name = Forms!frm_SupportFT!txtName
AND JobNo >= 0
HTH,
MGFoster:::mgf
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBP6FxL4echKqOuFEgEQIMqACgsrRPzgl9fzYtWJ3oDbzYZF ZobsYAnR8e
1ta5I8mwa33OvRz/nVJZ63Jw
=L4eZ
-----END PGP SIGNATURE-----
Deano wrote:
Ok, so I have this query;
Set rsjobs = dbs.OpenRecordset("SELECT tblSupport.Name, tblSupport.JobNo
FROM tblSupport WHERE (((tblSupport.Name)=" & Forms!frm_SupportFT!txtName &
") AND ((tblSupport.JobNo)>=0));")
Which creates an error;
??4????>?????? 3633
If I create the query separately and run it all is well.
What gives??
thanks
Martin
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.532 / Virus Database: 326 - Release Date: 27/10/2003