Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2012, 02:22 PM
ztag ztag is offline Prevent Field Calculation with Dates from introducing line break? Windows 7 32bit Prevent Field Calculation with Dates from introducing line break? Office 2003
Novice
Prevent Field Calculation with Dates from introducing line break?
 
Join Date: Jan 2012
Posts: 7
ztag is on a distinguished road
Default Prevent Field Calculation with Dates from introducing line break?

I have an implementation of Fields and Bookmarks that takes a date, adds some number of days to the date, and displays the new dates. I am taking the days and displaying them mixed in with some language text. I am also taking the resulting dates and attempting to display them with some language text, but the date calculations introduce a line break that I cant seem to get around.

Viewing the attached file will probably be helpful.

In the file, the revsubstcomplx fields are the are the new contract end dates (the calculated value), and the scopedaychangedayX fields are the number of days that are being added to the original date.



The "phenomenon" can be viewed on the third page - wherein the 1st field results display correctly because they only refer to number of days, the second the same, and the third results demonstrate the problem - where a line break has been introduced by the date reference.

Does anyone know how to prevent this date calculation from introducing a line break?

Thank you in advance, Macropod
Attached Files
File Type: doc Field Change Order Form - FULL - For Forum.doc (406.0 KB, 9 views)
Reply With Quote
  #2  
Old 01-13-2012, 04:13 PM
macropod's Avatar
macropod macropod is offline Prevent Field Calculation with Dates from introducing line break? Windows 7 64bit Prevent Field Calculation with Dates from introducing line break? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi ztag,

The problem is caused by some of the dates in your table's 'Rev. Subst. Compl. Date' column having paragraph breaks following them. Those paragraph breaks are included in the bookmarks - which you then refer to on page 3. Delete the extraneous paragraph breaks in the table and everything should be OK.

FWIW, depending on whether it outputs nothing or an error message (I haven't tested which), your field on page 3 coded as:
{ IF CO_number = 1 "revsubstcompl1." { IF CO_number = 2 { "revsubstcompl2" } { IF CO_number = 3 { "revsubstcompl3" } { IF CO_number = 4 { "revsubstcompl4" } { IF CO_number = 5 { "revsubstcompl5" } { IF CO_number = 6 { "revsubstcompl6" } { IF CO_number = 7 { "revsubstcompl7" } { IF CO_number = 8 { "revsubstcompl8" } { If CO_number = 9 { "revsubstcompl9" } { IF CO_number = 10 { "revsubstcompl10" } { IF CO_number = 11 { "revsubstcompl11" } { IF CO_number = 12 { "revsubstcompl12" } { IF CO_number = 13 { "revsubstcompl13" } { IF CO_number = 14 { "revsubstcompl14" } { IF CO_number = 15 { "revsubstcompl15" } { IF CO_number = 16 " { revsubstcompl16 } ." CHECK INPUTS" }}}}}}}}}}}}}}} }
could be reduced to:
{IF{REF "revsubstcompl{CO_number}" }= "" "CHECK INPUTS" {REF "revsubstcompl{CO_number}"}}
or:
{IF{REF "revsubstcompl{CO_number}" }= "Error!*" "CHECK INPUTS" {REF "revsubstcompl{CO_number}"}}

Similarly, your field coded as:
{ IF CO_number = 16 { IF { =SIGN({ REF scopechangeday16 }) }
= 1 "increased by {=ABS(scopechangeday16)} days." { IF { =SIGN({ REF scopechangeday16 }) }
= -1 "decreased by {=ABS(scopechangeday16)} days." "unchanged." } } }
could be reduced to:
{= scopechangeday16 \# "'increased by '0' day(s)'; 'decreased by '0' day(s)';'unchanged'"}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent Field Calculation with Dates from introducing line break? Prevent Outlook from adding line breaks vektor Outlook 4 02-14-2012 02:16 PM
Prevent Field Calculation with Dates from introducing line break? Calculation within Cells manich1 Excel 2 12-07-2011 02:59 PM
Prevent Field Calculation with Dates from introducing line break? Help with 'hours worked' calculation... Snvlsfoal Excel 1 08-11-2011 05:54 AM
Prevent Field Calculation with Dates from introducing line break? Mail merge line break camlad Mail Merge 3 06-29-2011 05:01 PM
paragaph hard break, soft break and ...strange break czomberzdaniela Word 2 12-03-2010 06:58 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft