can i add a button beside the textfield and when i press the button,it will calculate the effort*rate then enter it into the database....is it possible???...if yes,how can i do it???...
can i add a button beside the textfield and when i press the button,it will calculate the effort*rate then enter it into the database....is it possible???...if yes,how can i do it???...
It is possible to create a button to calculate. If you want to store the calculation in your database, go to your table and make a new field to store the calculation. I will call it Result.
Using the wizzard in the form view of the form make a button and name whatever you want. In the On Click in the properties of the button make an Event Procedure and use the following code.
[Result]=[Effort]*[Rate]
It is somewhat difficult, at least for me, to be more specific because I do not know where you want to show or how to use the result.
HTH
An investment in knowledge always pays the best dividends.
im doin a form to enter data into the database,when u enter value in effort n rate,i wan it to calculate amount...i wan it to show in the textfield...
There seems to be one commone request in all of your questions and that is the calculation of Rate x Effort.
If you want this result to apprar on a form, create a new, unbound text box and in its properties choose Name (first item) and call it RESULT. Then in the Control Source put
=[Effort]*[Rate]( this assumes you have two fields with these names)
All of the other situations you have mentioned can be done. It depends on where or how you want to display and if you want to store the result of the calculation.
Hope I have been of some assistance.
An investment in knowledge always pays the best dividends.
...but can i store the value of effort*rate in database??
1. YES you can store the value.
2. Ask yourself the question WHY do I want to store this result of effort*rate??????
Unless there is a very specific reason for storing the result, it is not necessary and should NOT be done.
You can have the result appear in the form and a report without storing the result.
If you still want to store the value in a table, let me know what the Record Source of the form is, that is, a table or query. Since I do not know how much knowledge of Access you have, I do not want my explanation to be to detailed or not detailed enough.
Also, you might want to try looking at the following web site.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.