How to save a Formula in a Access form

lg5050

Registered User.
Local time
Today, 11:15
Joined
Nov 26, 2014
Messages
25
Hi, I put the formula in the Text box field in the control source in the property's tool box and i don't know if it will save that calculation to the table. I was wondering if i can do VBA code to save the the calculation in the table. Please help me out!!! I have a field called CA Weigt and i put the formula in there as =[Weight] * 0.4536 and it works. How would i put it in a vba code.:confused:
 
Since it's a calculation why would you want to save it to the Table when it can be calculated at any time? You should however move it to the Recordsource of your Form.
 
I'm not sure about the record source. I don't know how to do that. I basically need every time i type in a number in the US Weight field it makes this formula =[Weight] * 0.4536 in the CA Weight Field.
 
And that is what will happen... so, what is the Recordsource of the Form?
 
im not sure i have never used that before can you please help me on that.
 
Did you create this database? If yes, how did you create the Form?
 
I am going to send a attachment so you can understand.

I created a table and a form. In the US Weight field I enter 80000 and I have a formula in CA Weight Field which would be =[Weight] * 0.4536. So if I enter that 80000 in US field it should calculate the field for me. How do I do that In vba code.
 

Attachments

  • form pic.png
    form pic.png
    78.1 KB · Views: 106
You don't need VBA, you just need to put the calculation in the Recordsource. I want to explain how to do that but I need the answers to the above. Or am I correct in assuming you do not know how to get to Design Mode of the Form and get the Recordsource?
 

Users who are viewing this thread

Back
Top Bottom