How can I update my table from a query in a form

G

Guest

How can I update my table from a query in a form? I have a query calculating
two user inputs on a form and displaying that results. The problem I have is
that since the results comes from my query, it is only displayed in the Form
and not the table. I want the information from the Form to be Updated,
Copied, Appended, or whatever to the Table. In my query I have the following
Expression " Amount: [TotalUnits]*[UnitCost] ." Then in my Form I have the
Record Source pointing to my query "Customer Job Query" Everything works fine
when I enter data into my Form such as the calculations, but it doesn't
update my Table. If I create a Query to Append, then it adds an additional
record. What can I do to get the results from the Amount field in the Form to
the Amount field in the Table? Do I need to write a code? Do I create a
macro? Do I create an expression? Please help.
 
J

John Vinson

On Thu, 9 Dec 2004 11:29:07 -0800, New User to Access <New User to
I want the information from the Form to be Updated,
Copied, Appended, or whatever to the Table.

Storing derived data such as this in your table accomplishes
three things: it wastes disk space; it wastes time (almost
any calculation will be MUCH faster than a disk fetch); and
most importantly, it risks data corruption. If one of the
underlying fields is subsequently edited, you will have data
in your table WHICH IS WRONG, and no automatic way to detect
that fact.

Just redo the calculation whenever you need it, either as a
calculated field in a Query or just as you're now doing it -
in the control source of a Form or a Report textbox.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top