Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Tue, 23 Sep 2008 08:40:20 -0700,    group: microsoft.public.word.vba.general        back       


VB code to require entry of date in specific format   
Is there a way to force a user to enter a date in a specific format, i.e. 
MM/dd/yyyy in a protected cell in a table on a form? I have formatted the 
form field the way I would like it to appear, but it does not force the user 
to put it in that form. In other words, it still allows them to put the date 
in whatever format they wish. I would like it to indicate to them when they 
press <Enter> that they have entered the date in the wrong format and show 
them the correct format.  Please help!
date: Tue, 23 Sep 2008 08:40:20 -0700   author:   transcriptlady

Re: VB code to require entry of date in specific format   
transcriptlady wrote:
> Is there a way to force a user to enter a date in a specific format,
> i.e. MM/dd/yyyy in a protected cell in a table on a form? I have
> formatted the form field the way I would like it to appear, but it
> does not force the user to put it in that form. In other words, it
> still allows them to put the date in whatever format they wish. I
> would like it to indicate to them when they press <Enter> that they
> have entered the date in the wrong format and show them the correct
> format.  Please help!

See http://www.word.mvps.org/FAQs/TblsFldsFms/ValidateFFields.htm.

-- 
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so 
all may benefit.
date: Tue, 23 Sep 2008 13:41:04 -0400   author:   Jay Freedman

Re: VB code to require entry of date in specific format   
transcriptlady wrote:
> Is there a way to force a user to enter a date in a specific format,
> i.e. MM/dd/yyyy in a protected cell in a table on a form? I have
> formatted the form field the way I would like it to appear, but it
> does not force the user to put it in that form. In other words, it
> still allows them to put the date in whatever format they wish. I
> would like it to indicate to them when they press <Enter> that they
> have entered the date in the wrong format and show them the correct
> format.  Please help!

In addition to my previous answer, you may want to look at 
http://www.gmayor.com/popup_calendar.htm where you can see how to let the 
user click a calendar to pick a date. The macro code can then place the date 
into the form field in whatever format you want (by using the proper pattern 
in the Format statement).

-- 
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so 
all may benefit.
date: Tue, 23 Sep 2008 13:46:07 -0400   author:   Jay Freedman

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us