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 / February 2008

Tip: Looking for answers? Try searching our database.

Accessing Controls Properties at Runtime

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hallr3 - 25 Feb 2008 21:48 GMT
We're currently working on a project using InfoPath 2007 Serverside Forms, we
have the need to set the "Cannot be blank" property of a control at runtime
via depending on values in dropdown combo. After much searching it does not
seem possible to do this via code. Has anyone come across this and found a
solution?

Thanks
Rick
Gavin McKay - 26 Feb 2008 00:21 GMT
Hello,

If you need to set this up programatically you could change the data
validation so it is reliant on another field in your data source, and not use
the "Cannot be blank" checkbox .  For example, you create a True/False field
called "ValidateMe" and then add a data validation item to your field so that:

MyField "is not blank" AND ValidateMe "is equal to" "1"

You could then set the "ValidateMe" field to true or false depending on
whether you want your field to be blank or not.  The setting of the
"ValidateMe" field could be done via code.

HTH

Gavin.

> We're currently working on a project using InfoPath 2007 Serverside Forms, we
> have the need to set the "Cannot be blank" property of a control at runtime
[quoted text clipped - 4 lines]
> Thanks
> Rick
 
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.