query seperating results

  • Thread starter Thread starter DJ Finnegan
  • Start date Start date
D

DJ Finnegan

My question is this:
I have a query based on start and end date but also user id (there are
several i have to keep track of).
Is there a way (magic button) i can have the database use same start and end
date then run query for multiple id's then export the whole thing to excel
with seperate spreadsheets for each id.
Sounds even more complicated when typing it.
Thanks.
 
The "magic button" part is the easiest ... you just create a command button
(on a form) that runs the code.

The code behind the button is a bit trickier, but still doable ... depending
on how your data is structured. Since Access is a (relational) database, it
all starts with the data!

Getting records for multiple IDs for a given date range sounds like a query.
What have you tried?

Exporting to Excel sounds like something you could do from the menu/toolbar.
What have you tried?

Separate spreadsheets for each ID sounds like something you'd need to know
how to do "automation" of Excel to accomplish. Do you have any VBA
experience?

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I know how to get queries into spreadsheets with VB and create magic button.
However my query is set up to ask for dates i guess it would be better
(easier) if i could have it run for all days within current month. then i
could set seperate queries up for user id's and export each to specific excel
workbook.

Question is really how to accomplish query on current month with out going
past (database contains years data) so in other words a query today would
only return march 1 thru mar 3.

does this make sense?
 
Perhaps I'm being too literal, but "March 1" through "March 3" would pull in
data from EVERY YEAR, wouldn't it?

I believe, if you want the current month's data, you'll need to either have
the user enter month and year choices, or you could use something like "From
Date" and "To Date" controls, and enter full dates in these (e.g.
#3/1/2008#, #3/31/2008#)

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top