Form VB Code Multiply Qty on Insert

klynch0803

Registered User.
Local time
Today, 01:07
Joined
Jan 25, 2008
Messages
102
*temp Disregard Changing form error*Form VB Code Multiply Qty on Insert

Hey I resolved the other issue with scanning in Members (managed to write the code) and have it working but maybe you can help me out here I'm lost on how to handle this or write it in vb...

I have a table tdatMeasurements with records like: ID, MeasurementType (Example Liter), ActualMeasurement (33.5)

I have a form to recieve inventory in and you select from drop down an Inventory Item that is stored in a table, you then enter a qty (IE: lets use 1) and select a measurement (IE: lets use Liter). So the way it looks above if you saved the record you would be saving a qty of 1 but what I want is it to take the Qty 1 and multiply that by the "tdatMeasurement.ActualMeasurement" and actually insert the answer qty in the table "tdatInventoryRec".

The form fields are RecDate, Item, Cost, Qty, Combo4(Being the one that you select Liter from)

The table it is saving to is tdatInventoryrec with fields RecDate, Item, Cost, Qty


Thank You in advance for any help I can get with this.
 

Attachments

Last edited:
You shouldn't store process data. Store qty and type instead.

However if you still want to do that, you have to create a field in your table to store this calculated field. Create a hidden field (invisible) which is bound to the calculated field in the table.
Use the save button to calculate and store the result in the hidden field. when you save the record, the calculation was also saved.

Enjoy!
 

Users who are viewing this thread

Back
Top Bottom