Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Smhall Smhall is offline
external usenet poster
 
Posts: 9
Default Formulas using merged and form field data

I have a form that merges data from an Access database. It also has form
fields to be filled in by the user. How can I set up a formula that uses
both sources. Example: Current Pay comes over from access, Increase Amount
comes from the user. I want to calculate the new pay and percentage increase.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Formulas using merged and form field data

As long as you have worked out how to merge a document with form fields, the
thing to recognise is that each form field has a bookmark name that you can
use in a calculation. So for example, if you just need to add Current Pay
and Increase Amount, and Increase Amount was in a form field with bookmark
bkmIncreaseAmount, you would need something like

{ ={ MERGEFIELD "Current Pay" }+{ REF bkmIncreaseAmount } }

where all the {} are the special field braces you can insert using ctrl-F9

Peter Jamieson
"Smhall" wrote in message
...
I have a form that merges data from an Access database. It also has form
fields to be filled in by the user. How can I set up a formula that uses
both sources. Example: Current Pay comes over from access, Increase
Amount
comes from the user. I want to calculate the new pay and percentage
increase.



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Smhall Smhall is offline
external usenet poster
 
Posts: 9
Default Formulas using merged and form field data

I have tried doing a simple calculation, but when I merge the form (using a
macro I found on this site!), I get errors instead of a result. Without
doing the merge, the formulas work. As soon as I run the merge macro, the
formulas stop working.

"Peter Jamieson" wrote:

As long as you have worked out how to merge a document with form fields, the
thing to recognise is that each form field has a bookmark name that you can
use in a calculation. So for example, if you just need to add Current Pay
and Increase Amount, and Increase Amount was in a form field with bookmark
bkmIncreaseAmount, you would need something like

{ ={ MERGEFIELD "Current Pay" }+{ REF bkmIncreaseAmount } }

where all the {} are the special field braces you can insert using ctrl-F9

Peter Jamieson
"Smhall" wrote in message
...
I have a form that merges data from an Access database. It also has form
fields to be filled in by the user. How can I set up a formula that uses
both sources. Example: Current Pay comes over from access, Increase
Amount
comes from the user. I want to calculate the new pay and percentage
increase.




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Formulas using merged and form field data

What was the simple calculation.

It is probably failing because it is making use of the bookmark names
assigned to the formfields in the mail merge main document. Those bookmarks
will not be present in the documents created by executing the mailmerge.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Smhall" wrote in message
...
I have tried doing a simple calculation, but when I merge the form (using a
macro I found on this site!), I get errors instead of a result. Without
doing the merge, the formulas work. As soon as I run the merge macro, the
formulas stop working.

"Peter Jamieson" wrote:

As long as you have worked out how to merge a document with form fields,
the
thing to recognise is that each form field has a bookmark name that you
can
use in a calculation. So for example, if you just need to add Current Pay
and Increase Amount, and Increase Amount was in a form field with
bookmark
bkmIncreaseAmount, you would need something like

{ ={ MERGEFIELD "Current Pay" }+{ REF bkmIncreaseAmount } }

where all the {} are the special field braces you can insert using
ctrl-F9

Peter Jamieson
"Smhall" wrote in message
...
I have a form that merges data from an Access database. It also has
form
fields to be filled in by the user. How can I set up a formula that
uses
both sources. Example: Current Pay comes over from access, Increase
Amount
comes from the user. I want to calculate the new pay and percentage
increase.






  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Formulas using merged and form field data

Yes, probably my mistake...

Peter Jamieson
"Doug Robbins - Word MVP" wrote in message
...
What was the simple calculation.

It is probably failing because it is making use of the bookmark names
assigned to the formfields in the mail merge main document. Those
bookmarks will not be present in the documents created by executing the
mailmerge.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Smhall" wrote in message
...
I have tried doing a simple calculation, but when I merge the form (using
a
macro I found on this site!), I get errors instead of a result. Without
doing the merge, the formulas work. As soon as I run the merge macro,
the
formulas stop working.

"Peter Jamieson" wrote:

As long as you have worked out how to merge a document with form fields,
the
thing to recognise is that each form field has a bookmark name that you
can
use in a calculation. So for example, if you just need to add Current
Pay
and Increase Amount, and Increase Amount was in a form field with
bookmark
bkmIncreaseAmount, you would need something like

{ ={ MERGEFIELD "Current Pay" }+{ REF bkmIncreaseAmount } }

where all the {} are the special field braces you can insert using
ctrl-F9

Peter Jamieson
"Smhall" wrote in message
...
I have a form that merges data from an Access database. It also has
form
fields to be filled in by the user. How can I set up a formula that
uses
both sources. Example: Current Pay comes over from access, Increase
Amount
comes from the user. I want to calculate the new pay and percentage
increase.









  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Smhall Smhall is offline
external usenet poster
 
Posts: 9
Default Formulas using merged and form field data

If the bookmarks aren't in the new document created by the mail merge, does
that mean I can't use them in a formula. The formula is { ={ MERGEFIELD
expr1 }*{ formfield MeritInc} }. Expr1 is the current pay amount from Access
and MeritInc is the percentage increase a supervisor wants to give.

"Peter Jamieson" wrote:

Yes, probably my mistake...

Peter Jamieson
"Doug Robbins - Word MVP" wrote in message
...
What was the simple calculation.

It is probably failing because it is making use of the bookmark names
assigned to the formfields in the mail merge main document. Those
bookmarks will not be present in the documents created by executing the
mailmerge.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Smhall" wrote in message
...
I have tried doing a simple calculation, but when I merge the form (using
a
macro I found on this site!), I get errors instead of a result. Without
doing the merge, the formulas work. As soon as I run the merge macro,
the
formulas stop working.

"Peter Jamieson" wrote:

As long as you have worked out how to merge a document with form fields,
the
thing to recognise is that each form field has a bookmark name that you
can
use in a calculation. So for example, if you just need to add Current
Pay
and Increase Amount, and Increase Amount was in a form field with
bookmark
bkmIncreaseAmount, you would need something like

{ ={ MERGEFIELD "Current Pay" }+{ REF bkmIncreaseAmount } }

where all the {} are the special field braces you can insert using
ctrl-F9

Peter Jamieson
"Smhall" wrote in message
...
I have a form that merges data from an Access database. It also has
form
fields to be filled in by the user. How can I set up a formula that
uses
both sources. Example: Current Pay comes over from access, Increase
Amount
comes from the user. I want to calculate the new pay and percentage
increase.








  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Formulas using merged and form field data

For starters, you should be using { REF MeritInc }, not { formfield
MeritInc }, where MeritInc is the name of the bookmark that you set in the
form field's properties.

You can do calculations using REF fields in a mailmerge main document
because the calculations are done /during/ the merge, /before/ the bookmarks
on which they rely are removed. However, when form fields are involved you
have to jump through extra hoops to do the merge, so what happens depends on
precisely how you are doing that.

Peter Jamieson
"Smhall" wrote in message
...
If the bookmarks aren't in the new document created by the mail merge,
does
that mean I can't use them in a formula. The formula is { ={ MERGEFIELD
expr1 }*{ formfield MeritInc} }. Expr1 is the current pay amount from
Access
and MeritInc is the percentage increase a supervisor wants to give.

"Peter Jamieson" wrote:

Yes, probably my mistake...

Peter Jamieson
"Doug Robbins - Word MVP" wrote in message
...
What was the simple calculation.

It is probably failing because it is making use of the bookmark names
assigned to the formfields in the mail merge main document. Those
bookmarks will not be present in the documents created by executing the
mailmerge.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Smhall" wrote in message
...
I have tried doing a simple calculation, but when I merge the form
(using
a
macro I found on this site!), I get errors instead of a result.
Without
doing the merge, the formulas work. As soon as I run the merge macro,
the
formulas stop working.

"Peter Jamieson" wrote:

As long as you have worked out how to merge a document with form
fields,
the
thing to recognise is that each form field has a bookmark name that
you
can
use in a calculation. So for example, if you just need to add Current
Pay
and Increase Amount, and Increase Amount was in a form field with
bookmark
bkmIncreaseAmount, you would need something like

{ ={ MERGEFIELD "Current Pay" }+{ REF bkmIncreaseAmount } }

where all the {} are the special field braces you can insert using
ctrl-F9

Peter Jamieson
"Smhall" wrote in message
...
I have a form that merges data from an Access database. It also has
form
fields to be filled in by the user. How can I set up a formula
that
uses
both sources. Example: Current Pay comes over from access,
Increase
Amount
comes from the user. I want to calculate the new pay and
percentage
increase.










Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I AutoSize (or Fit) merged, variable data within a text box? H Eric Torres Mailmerge 8 September 7th 06 11:44 AM
Merging data into a locked form? Phillip F. Bressoud Page Layout 1 February 22nd 06 03:33 PM
Merge data into word document form Excel, large signific number ecoeng Mailmerge 1 January 26th 06 11:46 PM
Merging Label Form File with Data File Becky N Mailmerge 7 February 18th 05 05:47 PM
How do I keep merged data from advancing surrounding text in a fo. Don Coffey Microsoft Word Help 0 December 23rd 04 04:03 PM


All times are GMT +1. The time now is 05:37 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"