C
Conan Kelly
Hello all,
Is it possible to set up a query to query different tables each time it is
run based on the value in a combo box on a form?
I have a Table Names table set up that contains all of the table names that
I would like to query. I have a form set up with a combo box bound to the
Table Names field in the Table Names table. I have a query set up that
pulls info from a single table. In the SQL view of the query, none of the
fields in the SELECT or WHERE statements have Table Qualifiers
([TableName].[FieldName]) (I don't know if Table Qualifiers is the correct
terminology--Please feel free to correct me if I'm wrong). They only have
field names ([FieldName]).
I tried changing the "FROM" statement to this: "FROM
[Forms]![frmTableNames]![cboTableNames]"
I have been able to do this in the past, but not in the way of changing what
table the query pulls from, only in the way of changing the criteria of
fields.
Is it possible to change which table a query pulls from based on a combo box
on a form?
Thanks for any help anyone can provide,
Conan Kelly
Is it possible to set up a query to query different tables each time it is
run based on the value in a combo box on a form?
I have a Table Names table set up that contains all of the table names that
I would like to query. I have a form set up with a combo box bound to the
Table Names field in the Table Names table. I have a query set up that
pulls info from a single table. In the SQL view of the query, none of the
fields in the SELECT or WHERE statements have Table Qualifiers
([TableName].[FieldName]) (I don't know if Table Qualifiers is the correct
terminology--Please feel free to correct me if I'm wrong). They only have
field names ([FieldName]).
I tried changing the "FROM" statement to this: "FROM
[Forms]![frmTableNames]![cboTableNames]"
I have been able to do this in the past, but not in the way of changing what
table the query pulls from, only in the way of changing the criteria of
fields.
Is it possible to change which table a query pulls from based on a combo box
on a form?
Thanks for any help anyone can provide,
Conan Kelly