How do I Pass the Value of Form Field to Query?

newone

Registered User.
Local time
Today, 14:53
Joined
Mar 8, 2001
Messages
15
I have an input form, "frmInvoice" that updates a "tblInvoice" table. While the form is still open and after data has been entered into the form, I would like to reference a field "UnitPrice" on the form from within a query to perform other calculations that will then be written to "tblInvoice." I will do this, if possible, via a command button. Can this be done? If so, can someone give me the syntax for criteria in the query? I understand how to write the data back to the table via a query but don't know how to reference the "UnitPrice" field in the query. I've tried forms!frmInvoice!UnitPrice but this didn't work.

Maybe simplier stated, I want the query to retrieve the Invoice number and Unitprice from the from so that it can perform a calculation that will be written to the tblInvoice table.

Any help is greatly appreciated.
 
It is generally accepted that you do not write calcultions to a table but make and display your calculations 'on the fly'. Given that I am not sure why you need to bring a query into the calculation.
 

Users who are viewing this thread

Back
Top Bottom