How to create calculated field in a form

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

Guest

I have an orders form with order-details as the subform. In the
order-details form, I am pulling item-desc from the inventory table. I would
also like to use cost+markup and store it in the sale-price field of the
order-detail table. Any ideas?

Thanks
 
Add two hidden textboxes on your order-details form. Set the control source
of one to Cost and the control source of the other to Markup. Put the
following code in the AfterUpdate event of the Item-Desc field:
Me!Sale-Price = Me!Cost + Me!Markup
 
Good evening

As a rule, you should not save calculated values to a table, simply display the
value.

Simply create an unbound text box and set the Control Source to: =NZ([Cost],0)
+ NZ([Markup],0)

Best Regards

Maurice St-Cyr
Micro Systems Consultants, Inc.
 
Back
Top