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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Naming Tables

Status
Not open for further replies.

jerrymcl

Technical User
Dec 7, 2007
3
I'm having a terrible time creating and naming a table based on a selection from a list box. My goal is to use the list box to loop thru and create a table / report for each entry, or manually select a single entity. I'm able to create a table named after the control, but not the data contained in the control. I'm thinking a syntax issue... Any thoughts...

thanks,

jerry
 
Can you provide some background and reason for this? I am at a loss as to why you would need/want to create tables on the fly.

Duane MS Access MVP
Now help me support United Cerebral Palsy
 
Sure thing,
My company collects data from numerous vendors and produces reports for our clients by cost center or whatever their corporate structure is. My goal is use "Access" to produce individual files that can be used by a bulk email platform. I currently have programs I wrote in fortran and assembly that do this, but it would be nice to get current. There's not to any of us "oldies" still around and it would be nice to leave behind a product that will be supported by the current generation of programmers.

jerry
 
Jerry -

I don't know if you knew this but Queries can be used just like tables, so you don't need to create tables, but you can use the query exactly like a table.

Thanks,

Bob Larson


Bob Larson
A2K,A2K3,A2K7,SQL Server 2000/2005,Crystal Reports 10/XI,VB6, WinXP, and Vista
Free Quick Tutorials and Samples:
 
Hi Bob,
Thanks for your reply,I am aware. My problem is, and I could be overlooking something very basic... I have a table created new every month from an imported client file. This table contains several fields including "cost center" and "responsible person". To that table I allocate monthly expenses from various vendors back to the appropriate cost centers. I then send back an xls file to each respnsible person with just their charges. One reposible person could have several cost centers. Presently to accomplish this I export the new table (all cost centers and charges) and break it up with an external program by "responsible person", each newly created file named after that person, then I convert each to excel. Very labor intensive. It would be nice to create these individual tables as a by product of one of the queries I'm already running and export them via a "do loop".

thanks,
jerry
 
You should have a single table and maybe add an 'ImportDate' field to identify the month you received the information. What is the structure of the table and what is the extracted information? You can create a function that will automatically create the spreadsheet AND email it back based on the query criteria...

Leslie

In an open world there's no need for windows and gates
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top