Email Report - Date format in subject of email

A

ant1983

Hi,

How do i change the date format from 2010/01/25 to 25-Jan-2010 in the
subject of my email? The fields dateStartDate and dateEndDate are the fields
containing the info.

The code as follows:

DoCmd.SendObject acReport, stDocName, acFormatPDF, "txtToEmail",
"txtCCEmail", "", "Attendance Register: " & txtCourse & " on " &
dateStartDate & " to " & dateEndDate & " - " & txtCompany & " - " & numRoom,
"Hi... Blah Blah Blah"

Thanks

ant1983
 
S

Stuart McCall

ant1983 said:
Hi,

How do i change the date format from 2010/01/25 to 25-Jan-2010 in the
subject of my email? The fields dateStartDate and dateEndDate are the
fields
containing the info.

The code as follows:

DoCmd.SendObject acReport, stDocName, acFormatPDF, "txtToEmail",
"txtCCEmail", "", "Attendance Register: " & txtCourse & " on " &
dateStartDate & " to " & dateEndDate & " - " & txtCompany & " - " &
numRoom,
"Hi... Blah Blah Blah"

Thanks

ant1983

....
Format(dateStartDate, "dd-mmm-yyyy") & "to " &
Format(dateEndDate,"dd-mmm-yyyy")
....
 

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