I have a table with sales records in it, the fields are "Item Number", "Date Sold" (defined as date()) , "Quantity Sold" (defined as number).
I am trying to get a select parameter query to work that will prompt the user for a beginning date and an ending date and then summarize the quantity sold by item number for all items sold from the beginning to ending dates the user supplies.
i coded the query grouping by the Item Number then coded the Quantity Sold to "sum" in the total row.
then i dropped in the Date Sold field and in the total row, coded it as "where"....... then, in the criteria field, I coded >="DATE1" And <="DATE2" ~ then i added two expression columns, one with the expression DATE1 and another with the expression DATE2. in the parameters for the query, i coded them both as date/time data types.
when i run the query, as expected, access prompts me for the DATE1 AND DATE2 fields (i enter, for example, 04/10/2001 for the first parameter prompt and 04/17/2001 for the second parameter prompt). I get the following error after i enter the second date ~ "This expression is typed incorrectly or is too complex to evaluate"
i then removed the parameters and coded the criteria on the quantity sold column as follows: >=#04/10/2001# And <=#04/17/2001# and the query worked fine.
Can someone help me to understand what i need to do to get Access to accept the dates as parameters rather than hard coding them into the query??
thanks so much
Paul
I am trying to get a select parameter query to work that will prompt the user for a beginning date and an ending date and then summarize the quantity sold by item number for all items sold from the beginning to ending dates the user supplies.
i coded the query grouping by the Item Number then coded the Quantity Sold to "sum" in the total row.
then i dropped in the Date Sold field and in the total row, coded it as "where"....... then, in the criteria field, I coded >="DATE1" And <="DATE2" ~ then i added two expression columns, one with the expression DATE1 and another with the expression DATE2. in the parameters for the query, i coded them both as date/time data types.
when i run the query, as expected, access prompts me for the DATE1 AND DATE2 fields (i enter, for example, 04/10/2001 for the first parameter prompt and 04/17/2001 for the second parameter prompt). I get the following error after i enter the second date ~ "This expression is typed incorrectly or is too complex to evaluate"
i then removed the parameters and coded the criteria on the quantity sold column as follows: >=#04/10/2001# And <=#04/17/2001# and the query worked fine.
Can someone help me to understand what i need to do to get Access to accept the dates as parameters rather than hard coding them into the query??
thanks so much
Paul