Access Reports / Charts / Automatic Date Range

  • Thread starter Thread starter Singinbeauty
  • Start date Start date
S

Singinbeauty

I am not sure if this is possible but if it is, I would so appreciate a push
in the right direction!

I have several bar charts that are posted everyday. I need to have it always
be a certain range of 2 months by the following Friday. So today's chart
would show from 12/14/2007 to 02/15/2008. Hopefully this makes sense.

Right now we are going in every Monday and manually changing the dates. Is
there a way to have this automatically done?
 
Singing,
An easy solution I use... given that the charts always print out in the
same location on the report... is to simply use an Access Text control,
place on top of the chart. That text control could contain
= StartDate & " to " & EndDate
Bring it to Front, and it looks just like it was on the chart itself.

Now, in order to calculate the next Friday, I'd build a loop (Ctr = 1 to
7 would do it). And using that Ctr, start adding Ctr days to today's date,
until you hit a date with a Weekday(varDate) = 6. That's your EndDate.
Of course, StartDate would be Today's date - 2 months.
DateAdd("m", -2,Date())
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Thank you so much for the response. But I am a little lost. LOL... Believe
me, no surprise there...

When you say 'Access Text Control' what do you mean? Could you step this out
from the beginning?

Your help is much appreciated!!!!
 
Singin,
Very basically...
A Text Control is what you use to display data from your tables on a form
or report. It can be "bound" to a table field, and display that field value
in forms and reports. Text controls can display Dates, or Text strings, or
Numbers.
Or, A Text Control may contain a calculated value, like = Price * Qty and
display that calculated amount on each record.

When you design a report, you place "bound" text controls on the form to
display the data field they are bound to.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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