View Single Post
  #7   Report Post  
Posted to microsoft.public.word.tables
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Document with multiple tables, form fields, bookmarks and calc

If you don't, grab the macro from http://www.gmayor.com/export_field.htm
then use it to post the exact structure you are using.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Carl Bentz wrote:
- Graham Thank you so much for your suggestions. About 15 seconds
after I posted my questions last night I realized my biggest problem
was that I didn't know exactly how to refer to the bookmarked values
I had created. You cleared that up very nicely. I am still fighting a
couple of Syntax Errors at this point, but I am sure that is
something stupid on my part and if I stare at it a bit more, I will
see it.
Thanks again.
Also Thanks to Doug Robbins for his assistance!

"Graham Mayor" wrote:

If bm1 bm3 etc are bookmarks, you should have more success if you use

{ =SUM({REF bm1},{REF bm3},{REF bm5}) \# "$,0.00" ) }
or
{={REF bm1} + {Ref BM3} + {Ref BM5} \# "$,0.00"}

For the sales Tax

{={REF st2} * .07525 \ # "$,0.00"}

assuming that is the sum that represents your tax

ie to use the bookmarks in a calculation you need to use REF fields
(which may not require the Word REF, but will require field
boundaries. Formular fields like this are not used from the form
fields manu but are inserted from the insert fields menu or
manually using CTRL+F9 for the field pairs - see also
http://www.gmayor.com/formatting_word_fields.htm

Note that calculations from form fields will show an error until all
the form fields that make up the calculation have numeric content.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Carl Bentz wrote:
Doug, ( or whom ever) Thank you for yur comments. I've been mulling
over what you said and perhaps the UserForm might be more to the
point, but at this point, I'm stuck with trying to do it work Word.
And I'm really puzzled if the addition of lines with form fields
would solve the problem either. I've tried to create as much of the
Estimate.DOT as possible and will
attempt to attach it here if i can figure out how. In the first
table using calculations I used 'bm1' and 'bm2' as column totals
using a =sum(above) to create a result in those BookMark fields.
Similarly in the second table 'bm3', 'bm4', and 'bm5' are used with
a similar calculation for Bookmark field results. The final table,
then, references those book marks to do subtotals, some auxiliary
calculations, salestax and a final overall total. Well, that was the
plan anyway, but obviously the syntax is wrong and "the index too
large" with no indication in Microsoft info sources as to what that
means.


Oh well, the idea of attaching the file was a good one, but i do not
see how i could do it! The following four error messages are from
the table doing the final calculations showing the error message and
the formula causing them.

1 Sub-Total st1 !Index Too Large

{ =SUM(bm1,bm3,bm5) \# $#,##0.00 ) }

Miscellaneous st2 !Syntax Error, ;

{ =SUM(bm2;bm4) \# $#,##0.00 )} also tried { =SUM(bm2,bm4) } and
got the index too large message

Sales Tax 0.07525% st3 !Syntax Error, [

{ =SUM(0.07525*st1,0.07525*st2) \# $#,##0.00 }

Total st4 !Index Too Large

{ =SUM(st1,st2,st3) \# $#,##0.00 }


Updating values will still present a problem as well as additional
lines as 2 items in each of the service type tables will probably
be insufficient, but if i can get the calcuations working i'll be
thrilled! Thanks.