Multiple Tables

  • Thread starter Thread starter Vina
  • Start date Start date
V

Vina

Hi, can someone help me and maybe give me some idea on
how to handle this situation.

I have different tables one is a master table which have
2 fields; Customer Name and Table Name. And another
tables(Price Detail table) for all Table Name in the
Master table.

The tables(Price Detail Table) dont have any field that
links to the customer name and it has the price
information. So what I am looking for is how can i create
a query or a sql that will link the right Table Name
depending on the customer name that they enter on a form.

ex: Customer Table will have:
Customer Name = ABC
Table Name = table123.dbf

And i need a query that will link a table to the
table123.dbf if they select customer name ABC. I need
that the second table that will link will be depending on
what's the tablename in the Master table.

Can someone help me on this, it will be greatly
appreciated.

Thanks
Vina
 
how can i create
a query or a sql that will link the right Table Name
depending on the customer name that they enter on a form.

Well... storing data in a tablename is a bad idea, for this very
reason. Is there any chance that you could run Append queries to
append all these dBase tables to a single Access table, with a field
indicating the source of the data? This would let you simply run a
parameter query selecting records by this field.

If you must keep the separate tables, they your only option is to
write VBA code to create SQL for the query on the fly.
 
Back
Top