Prev: Updateable Query Problem
Next: #num!
From: AccessKay on 26 Apr 2010 18:25 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.
From: KenSheridan via AccessMonster.com on 26 Apr 2010 18:46 Just change the interval argument of the DateAdd function from "m" to "q". Ken Sheridan Stafford, England AccessKay wrote: >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. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201004/1
From: AccessKay via AccessMonster.com on 26 Apr 2010 19:15 I'm having a good Access day today. Thanks Ken! I won't ask how to do the year:) KenSheridan wrote: >Just change the interval argument of the DateAdd function from "m" to "q". > >Ken Sheridan >Stafford, England > >>I'm not very good yet with writing expressions. How would I convert this >>expression to get the quarter? >[quoted text clipped - 3 lines] >> >>Thanks for any help. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201004/1
From: KARL DEWEY on 26 Apr 2010 19:18 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. -- Build a little, test a little. "AccessKay" wrote: > 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. >
From: John W. Vinson on 26 Apr 2010 21:23 On Mon, 26 Apr 2010 23:15:07 GMT, "AccessKay via AccessMonster.com" <u59222(a)uwe> wrote: >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". -- John W. Vinson [MVP]
|
Pages: 1 Prev: Updateable Query Problem Next: #num! |