Long Date Format

Haynesey

Registered User.
Local time
Today, 20:13
Joined
Dec 19, 2001
Messages
190
Hi,

I am using the following code in a text box control source:

="Monthly Report - " & DateAdd("m",-1,Format$(Date(),"mmmm yyyy"))

This currently reads: Monthly Report - 01/04/2005

However, I want it to read: Monthly Report - April 2005

I have tried every bit of formatting that I know!

Any ideas?

Thanks in advance
Lee
 
Is the field with the date actually a Date/Time field or have you accidentally left its Type as Text.
 
Still not working

Hi,

Just realised, I meant to post this in the Report forum.

It is an unbound field, I am really struggling with it. Have changed the format of the text box to Long Date but this still doesn't work.

Any ideas?

Thanks, Lee
 
Take off the $ - it's only for use when formatting a String.
 
Thanks for that, that is great.

Thanks for that, that is great. This forum is excellent!

The final piece of my database is the following. I currently use the following code to select all dates between the first day of the last month and the last day of the last month.

Between DateAdd("m",-1,"1 " & Format$(Date(),"mmmm yyyy")) And DateAdd("m",0,"1 " & Format$(Date(),"mmmm yyyy"))-1

This works great but now I need to look at it as a financial year and not a month so I need to know how to change the above code to say…

Between 01 April of this year if it is before 31 December or 01 April last year if it is after 31 December and DateAdd("m",0,"1 " & Format$(Date(),"mmmm yyyy"))-1

Please help me, I am tearing my hair out.
 

Users who are viewing this thread

Back
Top Bottom