Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

Calculating in Forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sue - 05 Oct 2005 15:42 GMT
I'm trying to calculate form fields and am having a heck of a time.  The form
fields I am trying to calculate are defined as number fields, fill in
enabled, calculate on exit.  The thought is to have users fill out a form,
and have certain fields calculated.  The syntax I'm trying to use to multiply
two fields (lets call them fieldone and fieldtwo) is as follows:
=SUM(fieldone*fieldtwo)
I've tried using a text form field and the field that's inserted through
Insert - Field.  When I do the Insert-Field, I get a Syntax Error message.  
When I use a text form field I don't get anything.
Any ideas anyone?
Ness - 05 Oct 2005 16:01 GMT
If you just want to multiply the fields use =fieldone*fieldtwo and have
calculation on exit on the last field.

> I'm trying to calculate form fields and am having a heck of a time.  The form
> fields I am trying to calculate are defined as number fields, fill in
[quoted text clipped - 6 lines]
> When I use a text form field I don't get anything.
> Any ideas anyone?
Sue - 05 Oct 2005 16:20 GMT
I've tried that with no luck.  The calculated field shows $0.00.

> If you just want to multiply the fields use =fieldone*fieldtwo and have
> calculation on exit on the last field.
[quoted text clipped - 9 lines]
> > When I use a text form field I don't get anything.
> > Any ideas anyone?
Ness - 05 Oct 2005 16:53 GMT
I tried and it worked fine. Perhaps you could try writing a macro containing
ActiveDocument.Fields.Update
on the exit of the field(or right click update fields). There is nothing
wrong with the formula syntax =field1*field2 (the sum DOES however return an
error0
Remember to protect the document for forms to properly use the form text
fields

Hope this helps- got to go.

> I've tried that with no luck.  The calculated field shows $0.00.
>
[quoted text clipped - 11 lines]
> > > When I use a text form field I don't get anything.
> > > Any ideas anyone?
Sue - 05 Oct 2005 17:11 GMT
My stupid error!  It's working.  For some reason I have to tab two fields
down and THEN it calculates!  I must have created them all willy-nilly!

Thanks Ness!

> I tried and it worked fine. Perhaps you could try writing a macro containing
> ActiveDocument.Fields.Update
[quoted text clipped - 21 lines]
> > > > When I use a text form field I don't get anything.
> > > > Any ideas anyone?
Greg - 05 Oct 2005 17:15 GMT
Sue,

"Lets call them fieldone and fieldtwo"  ???

You have to call them what they are bookmarked.  Open a blank new
document.  Enter three formfields.  By default the fields are
bookmarked text1, text2 and text3.

Double click the first field and format it a number type, calculate on
exit.  Do the same with the second field.  Double click the third field
and format it a calculation field.  Enter the formula =text1*text2

Protect the form and everything should work.  If you want to change the
terms in the formula then change the field bookmark names.
Sue - 05 Oct 2005 17:47 GMT
Thanks for the response Greg, but I figured it out. See my post above.
I was just using "fieldOne" and "Fieldtwo" as examples.  I knew to use the
bookmark names.

> Sue,
>
[quoted text clipped - 10 lines]
> Protect the form and everything should work.  If you want to change the
> terms in the formula then change the field bookmark names.
Greg - 05 Oct 2005 17:56 GMT
Ok.  Are you still having to tab two fields down?
Sue - 05 Oct 2005 18:41 GMT
No.  I got it now.  I set all fields to calculate on exit.  I'm getting the
hang of this!  Maybe you know my next hurtle...I want to make the form fields
longer than the 5 or so characters it displays so that I can underline them
and have them look the right size for the users as they are filling out the
form.  Any ideas?  When I look at the properties, I don't see anywhere to set
the length.  I just see a maximum length.

Thanks Greg!

> Ok.  Are you still having to tab two fields down?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.