Pick field control source at runtime

  • Thread starter Thread starter SAC
  • Start date Start date
S

SAC

I have a table with fields Jan, JanYTD, Feb, FebYTD, Mar, MarYTD....

I'd like to print a report --- the user picks the month on a form and then
I'd like to have the correct field, like Mar, be the data source for a
control on the report.

Is there an index property or something?

Thanks.
 
Can you normalize your data structure? This would allow you to use a
standard access query. If that isn't possible, you can create an option
group on a form
Form!frmA!grpField
Value Caption
1 January
2 Jan YTD
3 February
4 Feb YTD
etc
Then create a column in your query:
MonthPicked:Choose(Form!frmA!grpField,Jan, JanYTD, Feb, FebYTD, Mar,
MarYTD,...etc...)
 
Thanks, Duane. I'll check this out!


Duane Hookom said:
Can you normalize your data structure? This would allow you to use a
standard access query. If that isn't possible, you can create an option
group on a form
Form!frmA!grpField
Value Caption
1 January
2 Jan YTD
3 February
4 Feb YTD
etc
Then create a column in your query:
MonthPicked:Choose(Form!frmA!grpField,Jan, JanYTD, Feb, FebYTD, Mar,
MarYTD,...etc...)
 
Back
Top