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 / General MS InfoPath Questions / March 2007

Tip: Looking for answers? Try searching our database.

Data Validation II

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simba - 29 Mar 2007 18:46 GMT
I have a date picker field on my form. I want the date picker field to only
show the date and nothing else. Currently, I can type in some text and it
will show the text in the date picker field, with the inline alert around it.
I want an error message shown and also, I want the box cleared and the cursor
returned to that field after a user click 'OK' in the message box. I hope I'm
making myself clear. Can anyone help?
S.Y.M. Wong-A-Ton - 30 Mar 2007 10:14 GMT
To show a message box:  Use the "Data Validation" button on the properties
dialog box of the date picker to add a validation rule that says something
like:

datefield does not match pattern custom pattern 0000-00-00

and select alert type "Dialog box alert (show alert immediately)". The
custom pattern must be entered as \d\d\d\d-\d\d-\d\d in the Data Entry
Pattern dialog box.

To clear the field when an invalid date has been entered, add a rule on the
date picker with an Action that says:

Set a field's value: . = ""

with a Condition on this rule that says:

datefield does not match pattern custom pattern 0000-00-00

Note: Users will be forced to enter dates in the format yyyy-mm-dd (e.g.
2001-03-21, which is March 21, 2001).

For more information see
http://office.microsoft.com/en-us/infopath/HP010972021033.aspx?pid=CH01109705103
http://office.microsoft.com/en-us/infopath/HP010967511033.aspx?pid=CH01109705103
http://office.microsoft.com/en-us/infopath/HP011002671033.aspx?pid=CH011097041033
---
S.Y.M. Wong-A-Ton

> I have a date picker field on my form. I want the date picker field to only
> show the date and nothing else. Currently, I can type in some text and it
> will show the text in the date picker field, with the inline alert around it.
> I want an error message shown and also, I want the box cleared and the cursor
> returned to that field after a user click 'OK' in the message box. I hope I'm
> making myself clear. Can anyone help?
 
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.