Query Parameters

jsic1210

Registered User.
Local time
Today, 05:09
Joined
Feb 29, 2012
Messages
188
Hello,

Within a query, I'd like to reference another query field based on a date specified as a parameter. In my query, there are fields for each month: [January],[February], etc.
I have a field titled [Current Month], based on the parameter [As Of Date]. So if when running the query, the parameter pops up and I type 5/6/2013, it knows that the month is May. I know how to return May in the current month field (format([As Of Date],"MMMM"). But how to I return the value that is in the May column?
Thanks!
 
Never mind! If anyone's wondering, I used a DLookup:
DLookup("[" & Format([As Of Date],"mmmm") & "]","tblCPUCustomerChargesCurrent","[COID] = '" & [tblCPUCustomerChargesCurrent].[COID] & "'")
 
Just curious of table design with a field for each month-- can you tell more?
 
Keeping track of our customers usage for each month of the current year. There is a separate table for the previous year.
 

Users who are viewing this thread

Back
Top Bottom