Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Title of report to show Previous Week with dates 1

Status
Not open for further replies.

Pete271

Instructor
Feb 16, 2005
61
GB
Hi

I'm using CR8.5 and an access database.

I have a report that will be run once a week to show completed meeting contact reports.

I would like the heading to show

"Reports for last week dd/mm/yyyy to dd/mm/yyyy"

Naturally, I don't want to amend the report every week to make sure that the heading is accurate. Is it possible to automate this?

Many thanks
Peter
 
take the following which will work if the report is run today for last week till now
Code:
"Reports for last week " & totext(dateadd("d",-7,currentdate()),'dd-MM-yyyy') & " to " & totext(currentdate(),'dd-MM-yyyy')

using day (d) in date add.
 
If the reports are for the last full week, you can use:

"Reports for Last Week: "+
totext(minimum(lastfullweek),"dd/mm/yyyy")+" to "+ totext(maximum(lastfullweek),"dd/mm/yyyy")

-LB
 
many thanks for the suggestion, it led me on to

Code:
"Contact Reports for Meetings held last week " +CStr(Minimum(LastFullWeek)) + "-"+ CStr(Maximum(LastFullWeek))

which does the trick.

thanks
Pete
 
lbass - I didn't see your post before responding to the earlier response.

many thanks for your efforts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top