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 / Mailmerge and Fax / August 2007

Tip: Looking for answers? Try searching our database.

IF statement problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
projectmergeleader - 21 Aug 2007 14:32 GMT
I am writing a mail merge project to create a number of invoices from a
database created in access. I need to check a number that I obtained using a
count statement to see if it is between certain boundaries. When I try to do
this it does not work and the else staement is always executed. It may be
because the number is stored as text but even direct comparison doesn't work.

Also I need to round a number down to the nearest 0.01(its a price). Does
anyone know how to achieve this?

Thanks in advance,

S
Peter Jamieson - 21 Aug 2007 15:32 GMT
What does the code in your IF field look like at the moment?

> Also I need to round a number down to the nearest 0.01(its a price). Does

Have you tried the usualy formatting switches, or is the problem rounding
rather than truncation?

Signature

Peter Jamieson
http://tips.pjmsn.me.uk

>I am writing a mail merge project to create a number of invoices from a
> database created in access. I need to check a number that I obtained using
[quoted text clipped - 11 lines]
>
> S
projectmergeleader - 21 Aug 2007 16:28 GMT
I am a fool the reason it wasn't working was that that it went

{IF {{MERGEFIELD"CountOfMessage"}} <= 500
       ^^
   too many brackets

Regarding my other problem it is a rounding problem but since it is going to
be rounded down it could be truncated. I just don't know how to do it. Also I
need to add digits to some numbers, for example, if i have 2 i need 2.00.
Maybe this could be done with truncation as well.

Thanks,

S


> What does the code in your IF field look like at the moment?
>
[quoted text clipped - 18 lines]
> >
> > S
Peter Jamieson - 21 Aug 2007 16:37 GMT
Instead of

{ MERGEFIELD mynumber }

try

{ MERGEFIELD mynumber \#0.00 }

Signature

Peter Jamieson
http://tips.pjmsn.me.uk

>I am a fool the reason it wasn't working was that that it went
>
[quoted text clipped - 40 lines]
>> >
>> > S

Rate this thread:






 
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.