Updating a Table from a Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I constucted a table to hold the products we purchase and then re-sell. It
worked fine . I used the Forms Wizard to make a Form so as to add records to
this table. It worked fine. I then decided I wanted to add a MarkUp
percentage text box to the Form. In the "Control Source" of the Properties
window I typed: =(([UnitSell]-[UnitPrice])/[UnitSell]). On the "Format" line
I set the number to "Percentage". This worked like a charm and gave me the
Mark Up percentage on the Form.

Now I want to update a column in the underlying products Table. This field
is named "MarkUp". I can't figure out a way to do this. I've tired setting
the field to "Text" and "Number" to see a way to link the Form text box the
and Table field. I'm at a dead end. Can you help?

Thanks!
Dave
 
Dave said:
I constucted a table to hold the products we purchase and then re-sell. It
worked fine . I used the Forms Wizard to make a Form so as to add records to
this table. It worked fine. I then decided I wanted to add a MarkUp
percentage text box to the Form. In the "Control Source" of the Properties
window I typed: =(([UnitSell]-[UnitPrice])/[UnitSell]). On the "Format" line
I set the number to "Percentage". This worked like a charm and gave me the
Mark Up percentage on the Form.

Now I want to update a column in the underlying products Table. This field
is named "MarkUp". I can't figure out a way to do this. I've tired setting
the field to "Text" and "Number" to see a way to link the Form text box the
and Table field. I'm at a dead end. Can you help?

Calculated values that can easily be derived on the fly do not need to be nor
should they be stored in a table. Just use the expression you have now anywhere
you need that value shown.

If you don't want to keep writing the expression then create a simple SELECT
query that has all the fields from your table plus a calculated field based on
your expression. Then simply use the query every place you would otherwise have
used the table.

(and delete that field from your table entirely as you don't need it).
 
Rick Brandt said:
Dave said:
I constucted a table to hold the products we purchase and then re-sell. It
worked fine . I used the Forms Wizard to make a Form so as to add records to
this table. It worked fine. I then decided I wanted to add a MarkUp
percentage text box to the Form. In the "Control Source" of the Properties
window I typed: =(([UnitSell]-[UnitPrice])/[UnitSell]). On the "Format" line
I set the number to "Percentage". This worked like a charm and gave me the
Mark Up percentage on the Form.

Now I want to update a column in the underlying products Table. This field
is named "MarkUp". I can't figure out a way to do this. I've tired setting
the field to "Text" and "Number" to see a way to link the Form text box the
and Table field. I'm at a dead end. Can you help?

Calculated values that can easily be derived on the fly do not need to be nor
should they be stored in a table. Just use the expression you have now anywhere
you need that value shown.

If you don't want to keep writing the expression then create a simple SELECT
query that has all the fields from your table plus a calculated field based on
your expression. Then simply use the query every place you would otherwise have
used the table.

(and delete that field from your table entirely as you don't need it).
Rick:
Many thanks for your reply. Funny thing is that I had an idea that a query
was the solution "after' I posted my question. But your answer was more
complete. Thanks for the help.
Dave
 

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

Back
Top