How do I search for a specfic month in a query?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to set up a query which will result in my input of a 3 letter
month and the result will give me all tranactions for that month. Any help
on this would be appreciated.
 
You sure you want to do that? How are you going to distinguish between May
of this year and May of last year?

If you're sure, you can add an additional computed column to the query,
setting it to Format([MyDateField], "mmm") (replace MyDateField with
whatever the field is actually called). Then, you can add a parameter as the
criteria for that computed column.
 
This is what I would do:

In your query, if you add computed fields (assuming that your transactions
have a post /transaction date of some sort):

Month selection: Month([Transaction Date]
Year selection: Year([Transaction Date])

*Substitute [Transaction Date] field with actual field date that has the
post / transaction date.

Once you have created the computed fields, in the criteria field, I would
have it prompt the user to input what ever month / year information.

So, in the Month Selection field criteria line put: [Month Nbr]
Year Selection field criteria line put: [Year Nbr]


2nd option:

In the post date / transaction date field, I would put a prompt in the
criteria line:

Between [Start Date] And [End Date]

********************
 
Back
Top