Use Expression as Column Name (1 Viewer)

padlocked17

Registered User.
Local time
Today, 15:26
Joined
Aug 29, 2007
Messages
276
Use result of Expression to retrieve Value of a Field name(Generated by Expression)

All,

I've got an expression that identifies which column I want to reference in a query. I have field names called Jan_ACC, Feb_ACC, Mar_ACC, etc.

I then have an expression that determines which month it is and appends "_ACC" at the end. I was hoping to then use this expression in another expression and somehow include a "[" and "]" around it so that I could reference the column based on the name I generated. How would I go about this?

The expression to determine the name is
Code:
ThisMonth: MonthName(Month(Date()),True) & "_ACC"

How I'm trying to use it:

Code:
RemMonth:  IIf([Month_REQ]>0,IIf([ThisMonth]>0,"Done this Month","Not Done this Month"),"Not a monthly event")
 
Last edited:

valverde311

New member
Local time
Today, 13:26
Joined
Jun 28, 2010
Messages
2
Did you ever figure out the solution? I am trying to do something quite similar.
 

boblarson

Smeghead
Local time
Today, 13:26
Joined
Jan 12, 2001
Messages
32,059
It would need to be done through VBA code and if there are columns like that then it is not properly normalized.
 

Users who are viewing this thread

Top Bottom