Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-28-2013, 01:42 PM
Lesley Lesley is offline Date field inserting merge date in blank field Windows 7 64bit Date field inserting merge date in blank field Office 2010 32bit
Novice
Date field inserting merge date in blank field
 
Join Date: Sep 2013
Posts: 4
Lesley is on a distinguished road
Default Date field inserting merge date in blank field

I'm having a problem where the date that a document is merged is being inserted into the date field of the word document when it is void of data in the Access source table.

The Code for the field is:

{ MERGEFIELD Report_Date \@ "dd/MM/yyyy" }


This puts date in the format I want BUT the dates which are blank are given today's date

I'd be very grateful if anyone knows how I can fix it.
Reply With Quote
  #2  
Old 09-28-2013, 02:55 PM
Lesley Lesley is offline Date field inserting merge date in blank field Windows 7 64bit Date field inserting merge date in blank field Office 2010 32bit
Novice
Date field inserting merge date in blank field
 
Join Date: Sep 2013
Posts: 4
Lesley is on a distinguished road
Default

Ah... I just thought, this is not happening in Access/Word 2010 - blanks are shown as blanks

I'm working on this for another person and their computer is running Access 2002 on Windows XP. Not sure what version of Word it is but probably quite old.
Reply With Quote
  #3  
Old 09-29-2013, 06:43 PM
macropod's Avatar
macropod macropod is offline Date field inserting merge date in blank field Windows 7 32bit Date field inserting merge date in blank field Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Since the user is running Access 2002 on Windows XP, it's quite likely they're also using Word 2002.

I suspect the issue is that the Access data default's to today's date when blank. If today's date is never valid, you could use an IF field to suppress it:
{IF{MERGEFIELD Report_Date \@ "dd/MM/yyyy"} <> {DATE \@ "dd/MM/yyyy"} {MERGEFIELD Report_Date \@ "dd/MM/yyyy"}}

Note: The field brace pairs (ie '{ }') for the above example are created in the body of the document via Ctrl-F9 (Cmd-F9 on a Mac) - you can't simply type them or copy & paste them from this message.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 09-29-2013, 11:58 PM
Lesley Lesley is offline Date field inserting merge date in blank field Windows 7 64bit Date field inserting merge date in blank field Office 2010 32bit
Novice
Date field inserting merge date in blank field
 
Join Date: Sep 2013
Posts: 4
Lesley is on a distinguished road
Default

The blank date fields are blank in the Access table rather than being populated with today's date, so I'm not sure it's Access rather than the mail merge that's doing it. BUT I'll try that switch.

Is there a way to put 0 (zero) or null into the switch ?
Reply With Quote
  #5  
Old 09-30-2013, 12:04 AM
macropod's Avatar
macropod macropod is offline Date field inserting merge date in blank field Windows 7 32bit Date field inserting merge date in blank field Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

You can only test what's there (or not). Word is almost certainly not inserting today's date during the merge when the Access field is empty - it's more likely to be in the data coming from Access (i.e. it's how Access is storing your data).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 09-30-2013, 01:49 AM
Lesley Lesley is offline Date field inserting merge date in blank field Windows 7 64bit Date field inserting merge date in blank field Office 2010 32bit
Novice
Date field inserting merge date in blank field
 
Join Date: Sep 2013
Posts: 4
Lesley is on a distinguished road
Default

OK, thanks.

I'll get that tested out.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date field inserting merge date in blank field How to ignore a mail merge field if the field is blank redzan Mail Merge 1 05-16-2013 08:34 AM
Date field inserting merge date in blank field Date Field to add 10 Days to Current Date Erbwon Word 6 11-12-2012 06:17 PM
Please help me with creating due date field Artemio Word 1 03-01-2012 08:10 PM
Date field inserting merge date in blank field Mail merge will not format date field generated by Excel IF statement borntorun75 Mail Merge 3 12-16-2011 06:28 AM
Formula to subtract one month from due date field in reminder field ghumdinger Outlook 1 10-01-2011 12:09 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:02 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