Variable in Form Field Calculation?

T

TDMedia

I have figured out how to put together a simple calculation using
Forms. So far, I've gotten as far as:

$X multiplied by Y% = $Z . This is a formula I can use to calculate
sales tax on a specific price. Then, by adding $X to $Z, I can arrive
at the final price.

Now, how can I make Y% a drop-down box that allows me to choose from
the various tax rates in different counties? I tried just entering a
drop-down box there, but it won't calculate.

Please answer as if you are explaining this to a moron. I'm not good
with the common lingo used on this group.

Thank you!
 
G

Graham Mayor

Form fields assign their content to bookmarks. Right click the fields and
see the bookmark name - by default Text1, Text2, Dropdown1 etc. Check the
calculate on exit check box of the last field that contributes to the
calculation.
Where you require that calculation you should use a Word formula field.
Let's assume that you have a form field Text1 (your $X) that contains dollar
amounts - set a default of 0 and a dropdown field Dropdown1 which contains
your percentages entered as 10%,15%, 20% or whatever. Then a formula field

{ ={ Text1 } * { Dropdown1 } \# "$,0.00"}

will calculate the percentage value
and
{ ={ Text1 } * { Dropdown1 } + { Text1 } \# "$,0.00"}
will produce the total.

The only proviso is that if you want to show a dollar sign in field Text1,
then you insert that sign as text outside the field.

Fields entered from the keyboard require CTRL+F9 to create each pair of
field boundaries {}

Lock the form and make your entries.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
T

TDMedia

Graham:

By any chance, can you give me step-by-step instructions? Here's what
I want to do:

1. Enter a dollar amount
2. Select the sales tax rate from a drop down list
3. Calculate the sales tax
4. Calculate the grand total

Thank you!
 
G

Graham Mayor

1. Display forms toolbar
2. Type $
3. Insert a text form field.
4. Double click that field.
5. Enter 0 in default amount.
6. Click OK
7. Insert a dropdown form field.
8. Double click that form field.
9. Enter your sales tax rates. Put the most used one at the top of the list.
Insert the rates in the format 10%, 15% etc.
10. Check the calculate on exit check box.
11. Click OK
12 Type Sales Tax
13. Press CTRL+F9
14. Between the brackets type ={ Text1 } * { Dropdown1 } \# "$,0.00", using
CTRL+F9 for the brackets around Text1 and Dropdown1.
15. Type Total
16. Press Ctrl +F9
17. Between the brackets type ={ Text1 } * { Dropdown1 } + { Text1 } \#
"$,0.00"
18. Lock the form.
19. Dismiss the Forms toolbar
20. Enter your amounts in the form, tabbing between the fields.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top