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!

Saving Date in Long Form

Status
Not open for further replies.

Zepher2

Technical User
Dec 29, 2001
25
US
I am using active x calendar control to update a date field. I have the field formated as a long date - so the information on the form appears as Wednesday, May 11, 2005.

I am sending the field to a word document created by a template. However, the date in the word document appears as 5/11/05. I want the long date to appear in the word document. I think access save the date only in the short format and displays it in the long format.

How can I convert the short date to a text string in long format?

Any help will br appreciated.
 
Zepher2
In Access, you can use
Format(YourDateField, "mmmm dd, yyyy")

However, can you not set the field in Word? When you insert a field in Word, there are options for formatting.

Tom
 
How are Zepher2 . . . . .

Remember: Formatting is for display purposes only! A Date is actually an integer. When you read it thru VBA its coerced to Short Date, the standard for dates in Access.

You need to either read the text value of the control:
Code:
[blue]   Me!MyDateTextbox.Text[/blue]
for which the focus has to be set to the textbox first, or you can format the value you wand to send:
Code:
[blue]   Format(Me!MyDateTextbox,"Long Date")[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top