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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

export a textcalc to a table field

Status
Not open for further replies.

Zerdax

Programmer
Apr 20, 2005
48
IE
Hi, any way i can export a textbox with a calculation to a table field.

The textbox is a sum of other calculations.
I have put the code in its control source. now that i want is that it should export the calculated sum to field in a table.

the textbox = text45
the formula in it = =Round([Text37]*([Duty %]/100+1)+[Misc]+[Freight];2)

the table it should export to = register form
the field in that table it should export to = import price

plz help.
thanks
 
Place a hidden textbox on the form ControlSource with the field "import price". Then On any Event or function palce the code below
Code:
Me.HiddenTextBoxName.Value=Me.text45.Value
change the name of controls accordingly.

PS. It is not a regular practice to store calculated result in a table unless you have a genuine reason.

________________________________________
Zameer Abdulla
Visit Me
A child may not be able to lift too much.
But it can certainly hold a marriage together
 
a problem.
It says macro 'me.' not found
any solution.
putting the code on event on exit
 
Where did you paste the code? I believe you have pasted this in to the properties box. This is why it says Me. not found.
You need to paste it into the code window. Click on the Ellipsis button (...) at the right hand side of the event that will take you to the code window with

Private Sub.......
'YOU NEED TO PASTE THE CODE HERE
End Sub
Regards

________________________________________
Zameer Abdulla
Visit Me
A child may not be able to lift too much.
But it can certainly hold a marriage together
 
Done that but which event is best for a hidden textbox.
on focus i cant use because i wont be able to focus on it when it is hidden.

i have tryed almost all of the events but cant get it right. the value isnt updating when i change the calculation.
any sollution..
 
On AfterUpdate Event of the textboxes from where the values are being taken.
Text37
Misc
Freight etc..

________________________________________
Zameer Abdulla
Visit Me
A child may not be able to lift too much.
But it can certainly hold a marriage together
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top