Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

saving a calculated field to the control source table

Status
Not open for further replies.

dylan03

Technical User
Mar 17, 2003
15
0
0
US
I have a sales form that a salesperson completes at the time of the sale. The control is the [Sales] table. How do I calculate the fields so that they save to the (control source) table?

A shortened version of my Sales table context is:

TransactionID Number
CustomerName Text
SalePrice Currency
UsedCarAllowance Currency
TaxableAmount Currency

For example, when the rep enters the [saleprice] of $6000.00 and a [usedcarallowance] of $1000.00, I need the form to calculate (after requerying?) the [taxableamount] with the calculation of [saleprice]-[usedcarallowance].

I know I can enter this calculation into the controlsource directly, but then the value does not save to the [Sales] table.

Can anyone help? Let me know if you need further clarification to help me resolve this simple question.

Thanks in advance!
 
Create a query using the SALES table and add your expressions to that. Then base your form on the QUERY and your values will be saved.

ason1976

hope i'm not rambling

 
I thought that if I set the control source to a query, it wouldn't save the date to the table.. Am I incorrect in this thinking?
 
Have your DAte field in your table and add that too your query. Set the property to =now()

when your salespeople enter the transaction it will autofill the current date and save that in the table and the query. And all your calculations will be on the query (which is just a dynamic table)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top