Access 2000 Query source Table

  • Thread starter Thread starter WW
  • Start date Start date
W

WW

Using a Command Box and appropriate VB code I can readily select a
source table for a Report. How can I select a source table for a
Query? In VB code I need to msgbox in the source table name and have
this as source to the query.
 
Using a Command Box and appropriate VB code I can readily select a
source table for a Report. How can I select a source table for a
Query? In VB code I need to msgbox in the source table name and have
this as source to the query.

You'll actually need to construct the SQL string of the query from scratch,
concatenating the table-name variable with the rest of the query.

John W. Vinson [MVP]
 
You'll actually need to construct the SQL string of the query from scratch,
concatenating the table-name variable with the rest of the query.

John W. Vinson [MVP]

I should have added that I then want a report to run on the query data.
 
I should have added that I then want a report to run on thequerydata.

I have now solved this by using a table for the query that I use
DeleteObject to remove and CopyObject to replace with the required
table.

Thanks
 
I have now solved this by using a table for the query that I use
DeleteObject to remove and CopyObject to replace with the required
table.

Compact your database frequently, then - the space occupied by the table will
not be freed after DeleteObject. And the need to do this at all suggests that
you may have design flaws - where is the data that you're copying coming from?
If it's an Access table, you may have some alternatives (such as basing the
report on a select query).

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top