PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Form Programming
Dynamically Required form fields
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Form Programming
Dynamically Required form fields
![]() |
Dynamically Required form fields |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Is it possible to dynamically make elements in an Outlook
form required if a checkbox in that form is clicked? Example: Do you need a report created: Yes No If yes fill out the following: Name of report (etc) <-- I want these required IF the above answer is Yes. Can this be done? |
|
|
|
#2 |
|
Guest
Posts: n/a
|
You would need to do that in code in your Item_Write or Item_Send event handler.
-- Sue Mosher, Outlook MVP Outlook and Exchange solutions at http://www.slipstick.com Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.slipstick.com/books/jumpstart.htm "Jamie" <jamie.cook@tek.com> wrote in message news:00c201c33ffc$4a34ab20$a501280a@phx.gbl... > Is it possible to dynamically make elements in an Outlook > form required if a checkbox in that form is clicked? > > Example: > Do you need a report created: Yes No > > If yes fill out the following: > Name of report (etc) <-- I want these required IF the > above answer is Yes. > > Can this be done? |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thanks, Sue. I'm afraid that's still over my head. I'm
just in the early stages of figuring out how the VBScript works with forms and don't know the syntax yet. Do you have an example you can point me to? Thanks again, Jamie >-----Original Message----- >You would need to do that in code in your Item_Write or Item_Send event handler. >-- >Sue Mosher, Outlook MVP >Outlook and Exchange solutions at http://www.slipstick.com >Author of > Microsoft Outlook Programming: Jumpstart > for Administrators, Power Users, and Developers > http://www.slipstick.com/books/jumpstart.htm > > >"Jamie" <jamie.cook@tek.com> wrote in message news:00c201c33ffc$4a34ab20$a501280a@phx.gbl... >> Is it possible to dynamically make elements in an Outlook >> form required if a checkbox in that form is clicked? >> >> Example: >> Do you need a report created: Yes No >> >> If yes fill out the following: >> Name of report (etc) <-- I want these required IF the >> above answer is Yes. >> >> Can this be done? >. > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
It's pretty straightforward:
Function Item_Write() Set MyPage = Item.GetInspector.ModifiedFormPages("MyPage") Set CheckBox1 = MyPage.Controls("CheckBox1") If CheckBox1.Value = True And _ Item.UserProperties("My Property") = "" Then Item_Write = False MsgBox "Please enter a value for My Property" End If End Function The statement Item_Write = False cancels the saving of the item. See http://www.slipstick.com/dev/propsyntax.htm for the other basics of referencing form controls and custom properties. -- Sue Mosher, Outlook MVP Outlook and Exchange solutions at http://www.slipstick.com Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.slipstick.com/books/jumpstart.htm "Jamie" <jamie.cook@tek.com> wrote in message news:0ac901c34026$2756f110$a101280a@phx.gbl... > Thanks, Sue. I'm afraid that's still over my head. I'm > just in the early stages of figuring out how the VBScript > works with forms and don't know the syntax yet. Do you > have an example you can point me to? > > Thanks again, > Jamie > > > >-----Original Message----- > >You would need to do that in code in your Item_Write or > Item_Send event handler. > > > >"Jamie" <jamie.cook@tek.com> wrote in message > news:00c201c33ffc$4a34ab20$a501280a@phx.gbl... > >> Is it possible to dynamically make elements in an > Outlook > >> form required if a checkbox in that form is clicked? > >> > >> Example: > >> Do you need a report created: Yes No > >> > >> If yes fill out the following: > >> Name of report (etc) <-- I want these required IF the > >> above answer is Yes. > >> > >> Can this be done? |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

