Display Date Range In Text Box

J

JK

I have a pie-chart on my main menu that totals the number of billable hours
for each Service Technician for the last week (always 7 days from today.)

How would I make a text box display the actual date range, much like what is
done in reports. I'd like it to look like this:

From: 2/7/2008 To: 2/7/14/2008

I don't think I can use the query that generates the data for the pie-chart
becuase it would have to be outside that sub-form on my main menu. My main
menu does not have a data source.

If you have any ideas, I'd appreciate it.

Thx,
 
A

Al Campagna

JK,
If your chart always prints in the same position on the report, you
could simply place a Text control on top of the chart (bring to front), with
a ControlSource of...
= DateAdd("d", -7, Date()) & " TO: " & 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."
 
S

Stefan Hoffmann

hi,
How would I make a text box display the actual date range, much like what is
done in reports. I'd like it to look like this:

From: 2/7/2008 To: 2/7/14/2008
Assign the following as ControlSource to your TextBox:

="From: " & Me![fromDate] & " To: " & Me![toDate]

You may use

Format(ADateTime, "\#m\/d\/yyyy#")

To explictly format the date:

="From: " & Format(Me![fromDate], "\#m\/d\/yyyy#") & " To: " &
Format(Me![toDate], "\#m\/d\/yyyy#")

Copy it as a single line.


mfG
--> stefan <--
 

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

Top