Create a new Table from Form (1 Viewer)

hece99

New member
Local time
Today, 16:02
Joined
Dec 19, 2017
Messages
5
How do you create a table of records from a form/subform?
 

plog

Banishment Pending
Local time
Today, 15:02
Joined
May 11, 2011
Messages
11,646
You don't.

Tables aren't meant to be generated on the fly or dynamically. They are to be thought about, meticoulusly structured and then the form built atop them.

Can you provide a big picture idea of what you are actually trying to accomplish? What's this database for?
 

hece99

New member
Local time
Today, 16:02
Joined
Dec 19, 2017
Messages
5
I am creating a quotation data base with calculations. I created a form with a subform using fields from several tables (Customer, customer discount, item description, item sizes, quantity price breaks, etc). Should I first create a table selecting fields from multiple tables then create the forms?
 

mike60smart

Registered User.
Local time
Today, 21:02
Joined
Aug 6, 2017
Messages
1,905
Hi

No you should not do this.

You would have a Main Form and then a Number of subforms
 

plog

Banishment Pending
Local time
Today, 15:02
Joined
May 11, 2011
Messages
11,646
You don't store calculated values based on values stored in other tables. If you had quantity and unit price you wouldn't store Total price, you would simply use a query to calculate it.

I really think you should read up on normalization (https://en.wikipedia.org/wiki/Database_normalization) which is the process of setting up tables. And also work through an SQL tutorial (https://www.w3schools.com/sql/) which will help you understand how to write queries.
 

12asd

Registered User.
Local time
Today, 21:02
Joined
Dec 11, 2017
Messages
15
I am creating a quotation data base with calculations. I created a form with a subform using fields from several tables (Customer, customer discount, item description, item sizes, quantity price breaks, etc). Should I first create a table selecting fields from multiple tables then create the forms?

Try creating the table using the different fields from each table, then create the form you are going to use, making sure to properly label all objects for later use. Once you finished the form create an append query to THAT table you created, use the builder function to get a value from the form and add it to a specific field in the table.
 

isladogs

MVP / VIP
Local time
Today, 21:02
Joined
Jan 14, 2017
Messages
18,219
Try creating the table using the different fields from each table, then create the form you are going to use, making sure to properly label all objects for later use. Once you finished the form create an append query to THAT table you created, use the builder function to get a value from the form and add it to a specific field in the table.

And just to confuse the OP further, I wouldn't do that either as it would result in duplicated data....unless of course you then delete the original tables.

As already stressed by others, carefully plan out what you need, design one or more tables to match your plan then create forms/subforms as apprpriate
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:02
Joined
Feb 19, 2002
Messages
43,274
Should I first create a table selecting fields from multiple tables then create the forms?
When we design the application, we normalize the data and separate into non-redundant tables. However, when we use the data, we do it with queries that join two or more tables to bring the individual pieces of data back together.

For example your Orders table contains a customerID but NOT customer name and address. Your OrderDetails table contains a ProductID but NOT product details. However, when you create an order form or report, you always want to show the customer name and address and the product description and price. You do that with queries - NOT by making temp tables.

Queries and tables are interchangeable for most uses in an Access application so most people use queries as the RecordSource for forms and reports in order to bring in the data from related tables.
 

Users who are viewing this thread

Top Bottom