Using query criteria for table name

  • Thread starter Thread starter Da Viking
  • Start date Start date
D

Da Viking

Hello

I am running data extracts from a multisite inventory table, using the
[enter inv loc] criteria on a "make table" .
Is there a way that criteria can be used to name the output table. as I need
each table to have a unique name.

Thanks
Hans Soerlie
 
It is recommended NOT to have separate tables by location but have a field
named Location for site name.
 
Hello

I am running data extracts from a multisite inventory table, using the
[enter inv loc] criteria on a "make table" .
Is there a way that criteria can be used to name the output table. as I need
each table to have a unique name.

Thanks
Hans Soerlie

MakeTable queries are VERY RARELY either appropriate or necessary. There is
very little that you can do with a Table which you cannot also do with a
Select Query. You can base a Form, or Report, or Export on a select query; you
can link to the query from an external database; etc.

Why do you feel that you need to store this data redundantly, storing data in
table names?
 
the reason for the multiple tables is that the customer requests inventory
reports for multiple locations, wanting each location on a separate tab in
excel, so the current incarnation of my data collection database I create a
table for each station they want to see, then copy/paste to excel.

John W. Vinson said:
Hello

I am running data extracts from a multisite inventory table, using the
[enter inv loc] criteria on a "make table" .
Is there a way that criteria can be used to name the output table. as I need
each table to have a unique name.

Thanks
Hans Soerlie

MakeTable queries are VERY RARELY either appropriate or necessary. There is
very little that you can do with a Table which you cannot also do with a
Select Query. You can base a Form, or Report, or Export on a select query; you
can link to the query from an external database; etc.

Why do you feel that you need to store this data redundantly, storing data in
table names?
 
the reason for the multiple tables is that the customer requests inventory
reports for multiple locations, wanting each location on a separate tab in
excel, so the current incarnation of my data collection database I create a
table for each station they want to see, then copy/paste to excel.

Well, you can simplify your life then; if you're assuming that you must have a
separate table in order to export to Excel, your assumption IS WRONG.

You can create a Select Query selecting the inventory for a location, and use
File... Export to export it to Excel; or you can write VBA code or a Macro
using the TransferSpreadsheet method to export the query to Excel; or you can
copy and paste from the select query datasheet to Excel. The table is just an
unneeded extra step.
 

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