Performing a Query and then placing that data into another Table.

  • Thread starter Thread starter Gregg
  • Start date Start date
G

Gregg

I am trying to execute a query on a table then return the
results of that query into another table.

My big problem is this, I'm building an order table from
information out of several tables, then I gather threw a
query several products from a Products table.
And now need to add an order with a product into the order
table.

How do I read all the products from my query and then
place them into the order table with my original order
order information for each product line.

Example:
Requestor information + Shipping information = Order
Information.
15 Products also ordered. Gathered from the query.

Order Information + Product gathered by query. 15 times.

Any help is greatly appreciated.

Gregg.
 
I am trying to execute a query on a table then return the
results of that query into another table.

My big problem is this, I'm building an order table from
information out of several tables, then I gather threw a
query several products from a Products table.

umm...

Sorry. But that's the wrong design.

You do not need to, and should not, create a new table with redundant
data from the several other tables.

Instead, base your Form or your Report directly on the Query! That's
what queries are FOR.

If I'm misunderstanding the situation please explain.
 
Not sure what I'm doing, but here is what I'm trying to do.

I have a Form that gathers information from several
tables, and allows the filling of other information into
tables. All of this activity is designed to fillout and
order that has several optional parts that can be included.

The user checks all the parts that they want and then I
have a Button to create the Order. When the button is
pressed I begain to populate the Order table with all the
gatherd information, then I though I could run a query to
gather the parts that were selected and insert them into
the order table. This way I could keep all the information
readily retrivable by order number for latter reports.

If I'm going about this wrong any suggetions are welcomed,
I'm a newbie and this is my first attempt.
 
The user checks all the parts that they want and then I
have a Button to create the Order. When the button is
pressed I begain to populate the Order table with all the
gatherd information, then I though I could run a query to
gather the parts that were selected and insert them into
the order table. This way I could keep all the information
readily retrivable by order number for latter reports.

If I'm going about this wrong any suggetions are welcomed,
I'm a newbie and this is my first attempt.

You appear to be making the common assumption that you must have all
the data in a single table in order to generate a report.

This assumption is *incorrect*.

Don't confuse data storage with data presentation! Your Tables should
each represent a particular type of Entity - a table of Products, a
table of Customers, a table of Orders, etcetera. You can keep all the
information retrievable by order number by storing the OrderNumber as
the primary key of an Orders table, and creating Queries which link
the order table to the other relevant tables. See the Northwind sample
database for examples of how this can be done, or post back with a
description of your tables if you wish.
 
Back
Top