Login|Contact Us
Question and Answer

Ask a Question, Get an Answer ASAP!

  • Ask A Question
  • Browse Answers
  • Meet The Experts
  • How JustAnswer Works

Ask a Microsoft Word Question Ive created a form including

 
Greg Maxey's Avatar
  • Answered by:Greg Maxey
  • Consultant\Microsoft Word Expert
  • Positive Feedback: 100.0 %
  • Accepted Answers: 31
Verified Expert
in General

Recent Feedback

Positive
I went to the website you recommended and was able to do all suggested there...
Positive
Great Job. Thank You.
Positive
Needed something more permanent. Can really use what was offered.
Positive
Thank you - you have solved the problem. In my mind this is a glitch/flaw in MS...
Positive
Fast response and spot on solution. Strong the force with this one is.
Positive
Amazing answer...thanks...will save me a lot of time as I do this kind of thing...
Positive
The answer was great and provided exactly what I needed, BUT unfortunately I...
Positive
Quick response and Greg went into the necessary detail needed to answer my...
Positive
Very helpful and patient.
Positive
Greg -- Because of the limitation in MS Word, I will probablly use Adobe...

Customer Question

Ask a Microsoft Word Question
>I've created a form including monetary calculations, using formfields.

I need all fields to remain blank until the user has filled them in or they show the end result of a calculation based on the user's entry. Currently, an otherwise blank form has several result fields that show $0.00. I don't mind the dollar symbol, but the actual numerals are a problem in case the user needs to print the form and fill it out, rather than filling it out online.

 



Already Tried:
I was advised to use a nymeric picture switch (\#). The suggestion was to put \# "$0.00,$0.00," in a formula field, or to use the same format wihtout the switch in the Number Format box in the Text Form Field Options screen. Using the second option (and trying a number of variations), I still end up with zeros, miscellaneous characters (, " .), a result displayed incorrectly as to the placement of the decimal point or a blank field.

Submitted: 777 days and 16 hours ago.
Category: General
Value: $23
Status: CLOSED

Accepted Answer

Picture
Expert:  Greg Maxey replied777 days and 15 hours ago.

My name isXXXXX and I am a certified Microsoft Word Expert affiliated with JustAnswers. Thank you for giving me the opportunity to assist you with your Word question.

 

Based on the way numerical fields and calculation fields work one option (if you want to remain with formfields) is to use formatted numerical fields for your variables using the following numerical format and leave the defualt numbe field blank:

 

$#,##0.00;($#,##0.00);

 

and use a plain text field (with fill in enabled unchecked) for the result. You would need to assign the following macro to run on exit from your variable field.

Sub SumOnExit()

Dim lngA As Long, lngB As Long, lngResult As Long

On Error Resume Next

lngA = CLng(ActiveDocument.FormFields("Text1").Result)

If Err.Number <> 0 Then lngA = 0

Err.Clear

lngB = CLng(ActiveDocument.FormFields("Text2").Result)

If Err.Number <> 0 Then lngB = 0

On Error GoTo 0

lngResult = lngA + lngB

ActiveDocument.FormFields("Text3").Result = FormatCurrency(lngResult)

If ActiveDocument.FormFields("Text1").Result = "" Then

ActiveDocument.FormFields("Text2").Result = ""

ActiveDocument.FormFields("Text3").Result = ""

End If

End Sub

 

As an alternative you could leave the form as it is and offer you users to the option to clear all fields including the zeros before printing using this procedure:

Sub ClearZeroes()
Dim oFF As FormField
For Each oFF In ActiveDocument.FormFields
oFF.Result = ""
Next
End Sub

 

For help installing and using this macro see: http://www.gmayor.com/installing_macro.htm

Expert TypeConsultant\Microsoft Word Expert
Category: General
Pos. Feedback: 100.0 %
Accepts: 31
Answered: 5/3/2011

Experience: Microsoft Word Most Valuable Professional (6 years)

Ask this Expert a Question >
 
Tweet

78 Experts are Online Right Now

Ask Your Question Now
General Questions Date Submitted
how long to receive approval of target creditcard? 6/2/2013
Attention: TeacherGreg - Formal ties between Great Britain 5/31/2013
How long can beer be stored? 5/27/2013
Can I obtain the statistics on fatal coyote attacks at Valenicia 5/26/2013
I am Australian and visiting the UK and in the category of 5/25/2013
In a criminal case where a defendant has been charged with 5/19/2013
3-5 pages plus cover page and reference page 5/17/2013
I tried to order the movie Sci-Fighter 5/15/2013
I am looking for someone to help me with this assignment. 5/2/2013
1. A(n) __________ is a personal representative named by the 5/1/2013
RSS
Next 10 >
Ask an Expert
Type Your Question Here...
characters left:

Top General Experts

See More Experts

In The News

Nbc
Washington Post
New York Times
Cnn
Learn More

How It Works

  • Ask an Expert
  • Get a Professional Answer
  • Ask Followup Questions
  • 100% Satisfaction Guarantee
Learn More

Ask an Expert

Get a Professional Answer. 100% Satisfaction Guaranteed.
78 Experts are Online Now
Type Your Question Here...
characters left:
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Truste
Contact Us | Terms of Service | Privacy & Security | About Us | Our Network
© 2003-2013 JustAnswer LLC
  • Pearl.com
  • JustAnswer UK
  • JustAnswer Germany
  • JustAnswer Spanish
  • JustAnswer Japan