Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
DowningDevelopments
 
Posts: n/a
Default formatting from a database in Word 2003

hey everyone,
I had this working a few weeks ago but ive upgraded my database from Access
2000 to Access 2003 and now i have lots of formatting problems with
calculated values in an access query that i want to format as currency.

Im using the following and works as long as its not part of an IF statement,

{MERGEFIELD "M_42Pay1" \#"£0000.00}

works great and brings up the correct value as a currency just fine!
but i really need this in a statement like this:

{If {MERGEFIELD "GarantorsSname} "" "Payment 1: {MERGEFIELD "M_42Pay1"
\#"£0000.00} Due on Mergefield "M_06pay1dateHome"}

And this doesnt format that same value correctly, it shows it as a plain
number!!
Also how do i get subsequent payments to line up underneath this one?

{If {MERGEFIELD "M_42Pay2"} ="£0.00" {"Payment 2: {MERGEFIELD "M_42Pay2"
\#"£0000.00} Due on Mergefield "M_06pay2dateHome"}

should bring up the second payment due, however instead of a neat:

Payment 1: £1000 due on 01/01/2006
Payment 2: £1000 due on 01/03/2006

i get: Payment 1: £1000 due on 01/01/2006Payment 2: £1000 due on 01/03/2006

All on one line with no spaces or formatting, ive tried putting in
breaklines and paragraph marks in the IF quotations and between the blocks of
code but its not working!!!

can you help me on either (& hopefully both) of these problems?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default formatting from a database in Word 2003

The field construction should be

{ If { MERGEFIELD GarantorsSname} "" "Payment 1: { MERGEFIELD M_42Pay1
\# "£0000.00"} Due on { Mergefield M_06pay1dateHome}" }

Each pair of field delimiters must be inserted using Ctrl+F9
--
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

"DowningDevelopments" wrote
in message ...
hey everyone,
I had this working a few weeks ago but ive upgraded my database from
Access
2000 to Access 2003 and now i have lots of formatting problems with
calculated values in an access query that i want to format as currency.

Im using the following and works as long as its not part of an IF
statement,




works great and brings up the correct value as a currency just fine!
but i really need this in a statement like this:

{If {MERGEFIELD "GarantorsSname} "" "Payment 1: {MERGEFIELD "M_42Pay1"
\#"£0000.00} Due on Mergefield "M_06pay1dateHome"}

And this doesnt format that same value correctly, it shows it as a plain
number!!
Also how do i get subsequent payments to line up underneath this one?

{If {MERGEFIELD "M_42Pay2"} ="£0.00" {"Payment 2: {MERGEFIELD "M_42Pay2"
\#"£0000.00} Due on Mergefield "M_06pay2dateHome"}

should bring up the second payment due, however instead of a neat:

Payment 1: £1000 due on 01/01/2006
Payment 2: £1000 due on 01/03/2006

i get: Payment 1: £1000 due on 01/01/2006Payment 2: £1000 due on
01/03/2006

All on one line with no spaces or formatting, ive tried putting in
breaklines and paragraph marks in the IF quotations and between the blocks
of
code but its not working!!!

can you help me on either (& hopefully both) of these problems?



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default formatting from a database in Word 2003

Or even

{ If { MERGEFIELD GarantorsSname } "" "Payment 1: { MERGEFIELD M_42Pay1
\# "£,0.00" } Due on { Mergefield M_06pay1dateHome \@ "dd/MM/yyyy" }{ If
{ MERGEFIELD M_42Pay2 \# "0" } = 0 "¶Payment 2: { MERGEFIELD M_42Pay2 \#
"£,0.00" } Due on { Mergefield M_06pay2dateHome \@ "dd/MM/yyyy" }" }" }

Assuming that all this is only entered if the GarantorsSname field has
content then will also show the second field when the content is 0. Press
the enter key where the ¶ symbol is. Watch out for spacing and quotes. The
currency switches will include commas as thousands separators and date
switches are added to force your preferred date format.

If the second line is independant of the Garantorsname field content then
that part of the statement needs to be moved outside the first conditional
field thus:

{ If { MERGEFIELD GarantorsSname } "" "Payment 1: { MERGEFIELD M_42Pay1
\# "£,0.00" } Due on { Mergefield M_06pay1dateHome \@ "dd/MM/yyyy" }" }{
If { MERGEFIELD M_42Pay2 \# "0" } = 0 "¶Payment 2: { MERGEFIELD M_42Pay2 \#
"£,0.00" } Due on { Mergefield M_06pay2dateHome \@ "dd/MM/yyyy" }" }

See also http://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

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



Doug Robbins - Word MVP wrote:
The field construction should be

{ If { MERGEFIELD GarantorsSname} "" "Payment 1: { MERGEFIELD
M_42Pay1 \# "£0000.00"} Due on { Mergefield M_06pay1dateHome}" }

Each pair of field delimiters must be inserted using Ctrl+F9

"DowningDevelopments"
wrote in message
...
hey everyone,
I had this working a few weeks ago but ive upgraded my database from
Access
2000 to Access 2003 and now i have lots of formatting problems with
calculated values in an access query that i want to format as
currency. Im using the following and works as long as its not part of an
IF
statement,




works great and brings up the correct value as a currency just fine!
but i really need this in a statement like this:

{If {MERGEFIELD "GarantorsSname} "" "Payment 1: {MERGEFIELD
"M_42Pay1" \#"£0000.00} Due on Mergefield "M_06pay1dateHome"}

And this doesnt format that same value correctly, it shows it as a
plain number!!
Also how do i get subsequent payments to line up underneath this one?

{If {MERGEFIELD "M_42Pay2"} ="£0.00" {"Payment 2: {MERGEFIELD
"M_42Pay2" \#"£0000.00} Due on Mergefield "M_06pay2dateHome"}

should bring up the second payment due, however instead of a neat:

Payment 1: £1000 due on 01/01/2006
Payment 2: £1000 due on 01/03/2006

i get: Payment 1: £1000 due on 01/01/2006Payment 2: £1000 due on
01/03/2006

All on one line with no spaces or formatting, ive tried putting in
breaklines and paragraph marks in the IF quotations and between the
blocks of
code but its not working!!!

can you help me on either (& hopefully both) of these problems?



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
Word should catalog misspelled words to study. rndthought Microsoft Word Help 39 May 21st 23 02:47 AM
take yet another lesson from wordperfect "reveal codes" wordperfect is superior Microsoft Word Help 5 May 11th 09 07:58 PM
WP merge file to Word sstires Tables 4 February 14th 06 06:26 PM
How can Word display full path of a file in the title bar? SAsif Microsoft Word Help 1 January 26th 06 04:32 PM
Macros - Keyboard Commands Janet Microsoft Word Help 6 April 11th 05 05:28 AM


All times are GMT +1. The time now is 02:04 AM.

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"