Thread: Date Format
View Single Post
  #4  
Old May 17th, 2010, 11:49 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Date Format

I don't understand. If you have calculated the previous
year's quarter total in the record source query, just bind
the other text box to the calculated field just like you did
for this year's quarter total??
--
Marsh
MVP [MS Access]


AccessKay via AccessMonster.com wrote:
Thanks for your reply. I wasn't sure how to do the custom format but the
second option you gave me worked great. But how can I show the previous
year's quarter. I have two unbound text boxes on my form where I enter two
date periods. If the user enters 3/2010 into the second text box, then the
report will show Q1 Total for 2010 in one column but then I have another
column on the report (from expression in query) that is the previous year's
quarter. I want the report's unbound box to show this.


Marshall Barton wrote:
I have two things that I?m trying to do in an unbound text box in my report.
I have this =Format([Forms]![frmVariance]![txtMo2],"q""Qtr""yyyy") which
returns ?1QTR2010? but I want it to look like ?Qtr 1 2010?. I tried this
?Qtr? ?q? "yyyy" but Access changed it back to "q""Qtr""yyyy".

I also need the same thing for the previous year?s quarter like ?Qtr 1 2009?.


You do not need to use Format function to do that. Just set
the text box to =[Forms]![frmVariance]![txtMo2]
and then set the text box's Format property to a custom
format like:
"Qtr" q yyyy

If you must use the Format function, I think it should be:
=Format([Forms]![frmVariance]![txtMo2],"""Qtr"" q yyyy")