criteria

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

Guest

I am trying to make a query with a sort by month. I would just like to type
a month in and have it give me all the data associated with it. What would
my formula be?
 
In the query field for your date field put something like

TheMonth: Month([YourDateFieldName])

I'm assuming that you have a date/time field in the table and not just a
Month field with entries like 'June'.

In the criteria put:
[Enter the number of the month]

Run the query and when prompted, put in 7 for July.

Problem: The month function used like above will give you all the July's
from any year! If you want to narrow things down to both a month and year,
you'll need to add another column and use the Year function too.
 
You don't need a formula.
Create a Parameter Query using the normal GUI.
Test it manually first.
Call the query from a form using imput from one of the form's fields as the
parameter for the Query.

The Access Help probably explains the use of Parameter Querys.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top