Help needed ASAP - Searching Dates

  • Thread starter Thread starter Parsona
  • Start date Start date
P

Parsona

Guest
How do I prepare a query that prompts for the month and then displays the number of titles recorded that month?

The table I am using in this assignment has the following fields:

Title (Text)
Artist First Name (Text)
Artist Last Name (Text)
CD Price (Currency)
Tape Price (Currency)
Quantity on hand for CD's (Numeric)
Quantity on hand for Tapes (Numeric)
Recording Date (Date in MM/DD/YY format)

Help on this as soon as possible would be appreciated
 
Create an aggregate (Totals) query that includes a Count of the Title field. Add two new fields with the following expressions respectively: RecordMonth: Month([Recording Date]) and RecordYear: Year([Recording Date]). Do not show these fields in the final query (make sure the 'Show' checkbox in the Design Grid is not checked for both these new fields). Lastly, in the criteria fields of the newly created RecordMonth and RecordYear fields, type the parameters w/o quotations: "[Enter Record Month:]" and "[Enter Record Year:]"

That should do the trick!
 
Thanks

The tip worked. I got it done, and I thank you a lot. *g*

Good luck!
 
Since your working with existing dates, you can get around the separate month and year prompts with something like this (example based on Northwind's Orders table--change the field names to agree with your table.
Code:
PARAMETERS [enter mm/yyyy] Text;
SELECT Count(Orders1.OrderID) AS CountOfOrderID
FROM Orders1
HAVING (((Orders1.OrderDate) Between DateValue([enter mm/yyyy]) And DateAdd("m",1,DateValue([enter mm/yyyy]))-1));
 

Users who are viewing this thread

Back
Top Bottom