Q
Question Boy
I have a query which uses a criteria taken from a form
SELECT Contacts.Company, [FirstName] & " " & [LastName] AS Nom,
Contacts.BusinessStreet, Contacts.BusinessCity, Contacts.BusinessState,
Contacts.BusinessPostalCode
FROM Contacts INNER JOIN Contacts_par_categories ON Contacts.no_contact =
Contacts_par_categories.no_contact
WHERE
(((Contacts_par_categories.code_contact)=[Forms]![GuiWordTemplate].[Form].[cboCategorie]));
If I run the Query it works just fine.
Now I need to execute the query from code and loop through the recordset.
When I use the
Set rst = CurrentDb.OpenRecordset("qry_test")
it keeps spitting out an error "Too few parameters. Expected 1"? There is
one parameter, the name of the query to be used (ie: qry_test)!
Why is this not working? How can I get it to work?
Thank you!!!!!!
QB
SELECT Contacts.Company, [FirstName] & " " & [LastName] AS Nom,
Contacts.BusinessStreet, Contacts.BusinessCity, Contacts.BusinessState,
Contacts.BusinessPostalCode
FROM Contacts INNER JOIN Contacts_par_categories ON Contacts.no_contact =
Contacts_par_categories.no_contact
WHERE
(((Contacts_par_categories.code_contact)=[Forms]![GuiWordTemplate].[Form].[cboCategorie]));
If I run the Query it works just fine.
Now I need to execute the query from code and loop through the recordset.
When I use the
Set rst = CurrentDb.OpenRecordset("qry_test")
it keeps spitting out an error "Too few parameters. Expected 1"? There is
one parameter, the name of the query to be used (ie: qry_test)!
Why is this not working? How can I get it to work?
Thank you!!!!!!
QB