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 / Forms / May 2007

Tip: Looking for answers? Try searching our database.

Text Box Date Format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael - 16 May 2007 16:27 GMT
Hi Folks - I have a text box on a report. The underlying query was modified
to display the date in MMM dd, yyyy format. When I run the query, the date
is formatted properly. However, the text box that refers to the query date
field still displays in mm/dd/yyyy format. Note: The control source of the
text box uses concatenation. It looks something like this:

="Today's date is "&[datefield]

Any ideas?

Michael
Rick Brandt - 16 May 2007 16:38 GMT
> Hi Folks - I have a text box on a report. The underlying query was
> modified to display the date in MMM dd, yyyy format. When I run the
[quoted text clipped - 7 lines]
>
> Michael

Formats set with the format *property* are not inherited by the next object
that might refer to the thing you formatted.  You can use the Format()
function either in your query or in your report expression.

Note that if you use it in the query the output of that field will no longer
be an actual DateTime type, but instead will be a string.  That means it
will sort as a string and compare as a string instead of a date.  For that
reason it is normally best to wait till the spot where you are actually
displaying the value to apply the format function.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Michael - 16 May 2007 16:39 GMT
Never mind .... I found the answer ..... format([datefield],"mmm dd, yyyy")

> Hi Folks - I have a text box on a report. The underlying query was
> modified to display the date in MMM dd, yyyy format. When I run the query,
[quoted text clipped - 7 lines]
>
> Michael
 
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



©2009 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.