I know that using parameters I can input a particular value of a field but is it possible to modify the field itself in a query using a variable or VBA say using a text box value?
I have a table with several fields each containing many rows:
sales.AI
sales.CG
sales.HF
etc. (18 similar fields)
In a select query I want to select:
Table1.Field A Table1. Field B (a particular but selectable field from sales) Table2.FieldA
I can do this by manually entering the field that I want, e.g. sales.AI BUT I want to be able to select (like a parameter) whether field sales.AI or sales.CG is used
I have tried this as a parameter (e.g. sales.[user input]) but that doesn't work OR as a variable (e.g. sales.variable where the variable is set in code) but that doesn't work! All I get is the text appearing in the field not the value of the field.
Any ideas please - I don't want to produce 18 different queries for each variation.
Thanks, Mel
I have a table with several fields each containing many rows:
sales.AI
sales.CG
sales.HF
etc. (18 similar fields)
In a select query I want to select:
Table1.Field A Table1. Field B (a particular but selectable field from sales) Table2.FieldA
I can do this by manually entering the field that I want, e.g. sales.AI BUT I want to be able to select (like a parameter) whether field sales.AI or sales.CG is used
I have tried this as a parameter (e.g. sales.[user input]) but that doesn't work OR as a variable (e.g. sales.variable where the variable is set in code) but that doesn't work! All I get is the text appearing in the field not the value of the field.
Any ideas please - I don't want to produce 18 different queries for each variation.
Thanks, Mel