Hello,
I was wondering if you are able to embed a variable within a function within a query using a value based on a form.
I.E. I have a form that has a number which changes depending on a button you press named [var]. I have text boxes in different tabs called Switch1, Switch2, Switch3, Switch4, etc. The [var] number changes to the number corresponding with the tab that is selected, e.g. tab 4, changes var to 4
I would then like to reference the text boxes based on which number is following the word Switch. For instance, I would like to find the value for what is in the textbox Switch3. So I would like to find the value of "Switch"&[var], but it currently only stores it as a string.
I have one value as;
SwitchNumber: "[Forms]![Formname]![Switch"&[var]&"]"
What I now need is the value for "interface "&[SwitchNumber], but all that shows up is "interface [Forms]![Formname]![Switch2]", instead of the value in the Switch2 form.
Any help would be greatly appreciated.