Help with expression for Qtr

  • Thread starter Thread starter AccessKay
  • Start date Start date
A

AccessKay

I’m not very good yet with writing expressions. How would I convert this
expression to get the quarter?

Month_1: Sum(IIf([TransDate] Between ([Forms]![frmVariance]![txtMo1]) And
DateAdd("m",1,([Forms]![frmVariance]![txtMo1]))-1,[tblTrans_Mstr].[Labor_Cost],0))

Thanks for any help.
 
You can not get the Qtr from the [tblTrans_Mstr].[Labor_Cost] as it is not a
date.

Format([TransDate], "q") will give you a number representing the
quarter of the year that [TransDate] falls in.

Explain a little more of what you are trying to achieve.
 
I'm having a good Access day today. Thanks Ken! I won't ask how to do the
year:)

It might be prudent: you'll probably use "y" which is the day of the year
rather than the correct but noninuitive "yyyy".
 
Back
Top