Can we do SQL queries with variables.
And the variables can come from VBA tuples of another query or table field (I imagine this can't be done unless the queries in the VBA).
For example:
But how about the variable from the select of another query ?Code:SELECT field1 FROM tb WHERE field5 = variable
For example:
If this can't be done, can it be done in VBA with very long and complex queries (queries in the VBA and the variables in the queries)?Code:SELECT field1 FROM tb WHERE field5 = (SELECT field4 as fname FROM tb2 WHERE field2 = 5)