How to create calculated field in a form

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
 
P

PC Datasheet

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
 
S

StCyrM

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.
 

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