NigelShaw
Registered User.
- Local time
- Today, 19:34
- Joined
- Jan 11, 2008
- Messages
- 1,575
Hi,
im struggling on something i thought would be straight forward.
i have a query that needs to be filtered on a date. the open form has a date field that displays the date in the format dd/mm/yyyy
the form is open when the query runs and i set the criteria to
Forms!MainForm!TxtDateBox
when the query runs i get an error saying "Too few parameters, Expected 1"
when i add a parameter, i get a promt box to enter the date that is in the forms box.
The query is run by a recordset which is set up like
i get my error message then the code breaks and highlights the "set rs" line of the code.
why is it doing this? all i want is a simple filtered query......
hope someone can shed some light with a somewhat powerful torch
Nigel
im struggling on something i thought would be straight forward.
i have a query that needs to be filtered on a date. the open form has a date field that displays the date in the format dd/mm/yyyy
the form is open when the query runs and i set the criteria to
Forms!MainForm!TxtDateBox
when the query runs i get an error saying "Too few parameters, Expected 1"
when i add a parameter, i get a promt box to enter the date that is in the forms box.
The query is run by a recordset which is set up like
Code:
dim db As DAO.Database
dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = Db.OpenRecordset("MyQuery", dbOpenDynaset)
i get my error message then the code breaks and highlights the "set rs" line of the code.
why is it doing this? all i want is a simple filtered query......
hope someone can shed some light with a somewhat powerful torch

Nigel