Hi,
I have setup an Access database to run a report each month. However, the calculations are a little complex and will change with each month.
What I have done is created a form which asks the user to put in the month number.
So, now I have for example, two tables T1 and T2. Both of them have 13 columns each (one main field and 12 month columns with values). The 12 month columns have names like T1_Jan, T1_Feb.... & ..... T2_Jan, T2_Feb...etc.
Now I want to use VBA to run the query that interacts between these two tables, but the column name should be variable depending on the user input in the combobox.
Can anyone suggest the best way of doing this??
I have setup an Access database to run a report each month. However, the calculations are a little complex and will change with each month.
What I have done is created a form which asks the user to put in the month number.
So, now I have for example, two tables T1 and T2. Both of them have 13 columns each (one main field and 12 month columns with values). The 12 month columns have names like T1_Jan, T1_Feb.... & ..... T2_Jan, T2_Feb...etc.
Now I want to use VBA to run the query that interacts between these two tables, but the column name should be variable depending on the user input in the combobox.
Can anyone suggest the best way of doing this??