Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One table to multiple tabes based on field content?

Status
Not open for further replies.

Peterout

Technical User
Nov 23, 2000
20
0
0
CA
Hi gang . . .

I have one table that contains a field with various Dealer names. In total I have 62 Dealers with each having various number of records.

What I am looking for is a way to create unique individual tables based on each unique Dealer name. Currently I need to enter each Dealer name in a Make Table Query to accomplish this. I am hoping there is something faster to create individual tables for each Dealer.

All the tables will be exported as DBF files. So if anyone knows of a DBF program that could possibly do what I need, that would help as well . . .

Thanks!

Peter
 
With only a general concept of what you need, I can offer some general advice...

1. Run a Query to generate a table of unique Dealers. If no ID with name, use a AutoNumber Primary Key.

2. Join the Dealers and Records table on DealerID/DealerName, run a Make Table query for each DealerID/Name copying the Records to a table named for the Dealer.

Between steps 1 and 2 you will use the Dealer Name to define the table name to create.

As each Make-Table is processed, keep a DCount to sum total Dealer tables and total records copied, then when done compare that to the records total in the old database to see if you come up with the same totals...

 
Thanks fdcusa . . .

I will give your idea a try. Appreciate the feedback . . .

Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top