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

Manual Calculation to a Text Box in a Form 2

Status
Not open for further replies.

nag9127

Technical User
Mar 15, 2007
76
US
I have a form that has a text box that requires input which is often the result of a manual calculation related to liquid unit conversions. I know there are several different ways to approach this requirement, but I am wondering if someone can give me a solution that might involve an onscreen calculator with the ability to send a calculated result directly to the text box (assuming the text box has the focus) while closing the calculator, all with a single keystroke or mouse click. The operating system is WindowsXP and the version of Access is 2000. I have used the Windows calculator and I think it requires a copy, a paste, and then a close to accomplish this (too cumbersome for my users). Thanks for any help!
 
How are ya nag9127 . . .

If you know the formulas, [blue]all you need is a popup form that accepts the variables[/blue]. You click a command button, the formulas are calculated and the Textbox is populated with the answer!

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Thanks for the reply, TheAceMan1. I understand what you are saying and I can do that, but one problem is that the computation is not always the same... sometimes it is multiplication for a conversion downward (for example, gal to ml), other times it is division for an upward conversion (for example, kg to lb), so it is hard for me to standardize the formula so that values can simply be plugged in. Thanks for your help!
 
Sounds as though you need option groups to determine which calculation you are going to do in the first place. Secondly you need several textboxes to input the information or one popup box reappearing for each variable input. Then a method to start the calculation. Still more than one click!

alternatively, a single textbox in which the user types the calulation in, then a command button to perform the calculation.



Ian Mayor (UK)
Program Error
Always make your words sweet and nice. Because you never know when you may have to eat them.
 
nag9127 . . .

Include indicators on the form and/or in code to determine which formula to use! . . . Its really not so tough . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
The first reply got me to thinking of the same solution that you guys have proposed. In fact I am thinking of creating a pop up conversion form with the conversions listed and when you click or double click on a specific conversion, the conversion form closes and it brings up a calculation pop up which shows the result of multiplying the base field amount by the conversion factor. It will come up in multiply by default (most of the conversions are multiplication) with an option to change to divide. If it doesn't require a change, one click on an OK box would send the calculation into the proper field and close the calculation pop up at the same time without requiring any input of numbers. Thanks for guiding my thinking! Any comments or heads up on this idea?
 
nag9127 . . .

The [blue]result[/blue] and [blue]comand button[/blue] should/can easily reside on the same form!. If a calculation error is due to data entry, [purple]your still in the form![/purple]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top