Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / March 2007

Tip: Looking for answers? Try searching our database.

Date Expression

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Super Wife Mom - 28 Feb 2007 21:28 GMT
I have a report with a bound control called [TransDate] (in dd/mm/yyyy
format).  There is another unbound text box called [DateRange].  I would like
to display the text "1-30 January YEAR" in [DateRange] for every record where
the [TransDate] is in January regardless of the year, "1-29 February YEAR"
for every record in February, etc...  

I would like to place it on the Format Event of the Footer of the report.  
All suggestions gratefully received!
Marshall Barton - 28 Feb 2007 23:53 GMT
>I have a report with a bound control called [TransDate] (in dd/mm/yyyy
>format).  There is another unbound text box called [DateRange].  I would like
[quoted text clipped - 4 lines]
>I would like to place it on the Format Event of the Footer of the report.  
>All suggestions gratefully received!

I think you can fo all that with an expression in the
DateRange text box:

=Choose(Month(TransDate), "1-30 January YEAR","1-29 February
YEAR", . . .)

Signature

Marsh
MVP [MS Access]

John Spencer - 01 Mar 2007 14:02 GMT
The expression would probably be as follows.

Me.DateRange   = "1-" & Format(
DateSerial(Year([TransDate]),Month([TransDate])+1,0), "dd mmmm yyyy")

Signature

John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

>I have a report with a bound control called [TransDate] (in dd/mm/yyyy
> format).  There is another unbound text box called [DateRange].  I would
[quoted text clipped - 6 lines]
> I would like to place it on the Format Event of the Footer of the report.
> All suggestions gratefully received!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.