Query question

F

Frank

New to access, so here it goes. I have 4 queries that
pull data for 4 different quarters throughout the year. I
have these queries pull the data by the date (#1/1/04# And
#3/31/04#) is for First Quarter, etc.

Question 1 - Is there an easier way where I need to only
create one query to do all four quarter instead of making
4 separate?

Question 2 - How would I do it to where I the user asks
for a year and that years data is displayed. Right now, I
would have to go in each year and change the criteria for
each query I created. I want it where I do not have to do
that.

All help is appreciated.

Frank
 
C

Chris Nebinger

You could probably have 1 query. Use the DatePart
function to get the quarter:

Quarter:DatePart([DateField],"q")

You could also do a parameter query. Add a column for Year

DataYear:Year([DateField])

In the criteria:

[Enter year to pull]


When you run it, you will get a input box asking for the
year. Enter a valid one, then hit okay.



Chris Nebinger
 

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

Similar Threads


Top