View Single Post
 
Old 05-08-2013, 03:19 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,471
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 actually do this without a macro, using field coding to conditionally display a message in the body of the document. The field code would be:
{IF {End \@ YYYYMMDD} > {Begin\@ YYYYMMDD} "" "Term ending date must be after beginning date."}
Simply check the formfields' 'calculate on exit' property. Some additional field coding could be used to suppress the message when either field is empty.

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