General discussion
Thread display: Collapse - |
All Comments
Start or search
Create a new discussion
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
Access - set RecordSource from variable?
I tried storing the combo value, which match the names of the tables, to a variable (strSource), and then using the following line of code:
Me!RecordSource = "SELECT * FROM strSource"
But SQL tries to interpret the variable name literally. In other words, it can't find a table named "strSource".
I can do it with an IF or Select statement, but I'm just wondering if there is a way to get the SQL statement here to read from a variable.
thanks!