Ok, I'll try this again and maybe it will make more sense. :-) I have a table: mytable Two columns: [Product] and [RepName]
There are 350 individual RepNames and I need a separate table for each one with the products aligned (I have to export to Excel and I can do that later). Does anybody know how I could run the make-table query 350 times with each name being the parameter in the query? I have another table with one column which is just [RepName]. If I could figure out how to read each row in that table in the [RepName] field then this would work. It would also need a new name for each of the exported tables. I found DoCmd.RunSQL but that doesn't work on a make-table query with a "WHERE" Clause. Any ideas, please? Could you give this a try if you don't know how to do it? Or could you suggest a place where I could look to find an answer for this? Thanks very much. Reg --- In [email protected], "rmillson2001" <[EMAIL PROTECTED]> wrote: > > Hi everyone -- I've enjoyed being a member of this group for several > years but I've never posted much. > > I am trying to run several "make table" queries on a single table to > create several small tables. I'm using the "Name" field for the > criteria in the query -- so one table for every name. > > Could someone help with an example of code, or perhaps just > something easy that can be used in SQL to do this? > > The only alternative I can think of is to manualy create several > queries (one each for 340 names) and that will take forever. > > Any clues on how this can be done? Maybe a subquery that reads each > name and inserts into a WHERE clause? > > Thanks -- I asked this before in a different way but I guess I > either didn't word it well or nobody here knew the answer. :-) > > Reg >
