bmhuettinger
Registered User.
- Local time
- Yesterday, 22:53
- Joined
- Jul 28, 2017
- Messages
- 59
Good evening,
I have 3 tables of monthly usage data that is updated daily using "rolling 12 month" criteria. I'd like a summary form that shows MTD, as well as the previous 11 months usage for each of the 3 categories (tables). Since the month names will change every month (rolling 12), I need to use the dateadd function but I don't know how to use it properly with a dlookup. (I know the expression works because it returns the correct results if I use it as criteria in the query).
=Nz(DLookUp("[SumofLbs]","qry_NonProgramUsageSummary","[mth] =" & Month(DateAdd("m",-1,Date()))))
What am I doing wrong? I'm guessing I'm missing "" or & or something....
Thank you in advance for your help!
I have 3 tables of monthly usage data that is updated daily using "rolling 12 month" criteria. I'd like a summary form that shows MTD, as well as the previous 11 months usage for each of the 3 categories (tables). Since the month names will change every month (rolling 12), I need to use the dateadd function but I don't know how to use it properly with a dlookup. (I know the expression works because it returns the correct results if I use it as criteria in the query).
=Nz(DLookUp("[SumofLbs]","qry_NonProgramUsageSummary","[mth] =" & Month(DateAdd("m",-1,Date()))))
What am I doing wrong? I'm guessing I'm missing "" or & or something....
Thank you in advance for your help!