Solved

Create a New Table Automatically in a Database

Posted on 2014-01-13
3
261 Views
Last Modified: 2014-01-17
Hello,

I have created a database using MS Access 2010.  Overall the database is very simple and is used to keep records of quotes that we submit to customers.  I am trying to create a way so that once a quote is approved we can then use possibly a macro that will create its own table within the database in which we can then enter the order details.  It would be ideal if the new table is created with pre-determined formatting.

Example: a quote is approved.  I click on the macro that possible copies an existing template table that has the formatting in place.  The table opens.  Our representative then enters the order list into the new table and then saves the table using a job specific number that we create internally.

Any help is greatly appreciated!

Best regards,
Luke
0
Comment
Question by:calwood28
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 31

Accepted Solution

by:
Helen Feddema earned 250 total points
ID: 39777378
Why a new table for each order?  It would be better to have an Orders table, and add a new record per order.  You probably also need a Customers table, with a one-to-many link between Customers and Orders, and maybe an Order Details table, with a one-to-many link between Orders and Order Details (like the sample Northwind database).
0
 
LVL 30

Assisted Solution

by:hnasr
hnasr earned 250 total points
ID: 39777397
Create an empty table as a template, say templateQuote:

DoCmd.RunSQL "Select * Into newTableName From templateQuote"

Think out your design, to use one table with extra flag fields.
0
 
LVL 37

Expert Comment

by:PatHartman
ID: 39777569
Access is not Excel.  Do you think Amazon creates a separate table for each order?  No.  Creating a separate table for each order would imply that you will duplicate all the forms, reports, and queries also.

When you use a relational database, you use queries to isolate data so when you want to see only the order for Sam, you use selection criteria that returns only that order to populate your forms.  You will save yourself lots of work and frustration by getting a little education or doing some self learning by watching some videos on normalization.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question