G
Guest
I have JOINed two tables in SQL using variables for the table names. (The SQL works fine since I can access the data via DEBUG).
BUT what is the right VB syntax to access the data in code.
If the table names were explicit I can use the syntax 'MySet![ABC.field1].value' where ABC is one of the table names. BUT what is the syntax for a variable table name in this same context?
thanks
Laurie Eaton
That is:
If I join two tables with explicit names I can access the data in the recordset using
'MySet![ABC.field1].value' where 'ABC' is one of the explicit names. This works fine.
But if the explicit table name is replaced by a variable in the SQL statement I can't find the correct syntax in VB to access the data. The SQL part with variable names (in the form '" & XYZ & ") is working ok since I have checked it in Debug. The data is in the recordset but I can't get to it using variables.
So in summary my problem is the VB syntax to access the recordset when the table names used to form the recordset via a SQL JOIN are variables.
BUT what is the right VB syntax to access the data in code.
If the table names were explicit I can use the syntax 'MySet![ABC.field1].value' where ABC is one of the table names. BUT what is the syntax for a variable table name in this same context?
thanks
Laurie Eaton
That is:
If I join two tables with explicit names I can access the data in the recordset using
'MySet![ABC.field1].value' where 'ABC' is one of the explicit names. This works fine.
But if the explicit table name is replaced by a variable in the SQL statement I can't find the correct syntax in VB to access the data. The SQL part with variable names (in the form '" & XYZ & ") is working ok since I have checked it in Debug. The data is in the recordset but I can't get to it using variables.
So in summary my problem is the VB syntax to access the recordset when the table names used to form the recordset via a SQL JOIN are variables.