Query problem

brad78

Registered User.
Local time
Yesterday, 22:05
Joined
Oct 10, 2008
Messages
32
Hi All,
I have a query that i use to generate and XML document from an access table. I have just been asked to update the query so the user is prompted to select a start and end date so the results are between start and stop. Problem is I keep getting a "too few parameters" error. Can someone let me know where I'm going wrong here, I've been looking at this for hours...

SELECT page_last_updated, page_file_name, description FROM update_html WHERE (((page_last_updated) Between [startDate] And [endDate]) AND ((completed)=Yes) AND ((homepage)=Yes))

Thanks a bunch!
Brad
 
Quick and dirty solution:

Enter the following line in your immediate window:
Code:
'Determine how many parameters
?currentdb.QueryDefs("YourQueryname").Parameters.count
3
'Show their names.
?currentdb.QueryDefs("YourQueryname").Parameters(0).Name
?currentdb.QueryDefs("YourQueryname").Parameters(1).Name
?currentdb.QueryDefs("YourQueryname").Parameters(2).Name
The last three lines will give you the names of the fields of which the Jet engine can't find a match in your tables/queries. They are your parameters.

HTH:D
 

Users who are viewing this thread

Back
Top Bottom