PC Review


Reply
Thread Tools Rate Thread

Dynamically Required form fields

 
 
Jamie
Guest
Posts: n/a
 
      1st Jul 2003
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?
 
Reply With Quote
 
 
 
 
Sue Mosher [MVP]
Guest
Posts: n/a
 
      1st Jul 2003
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" <(E-Mail Removed)> wrote in message news:00c201c33ffc$4a34ab20$(E-Mail Removed)...
> 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?

 
Reply With Quote
 
Jamie
Guest
Posts: n/a
 
      2nd Jul 2003
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" <(E-Mail Removed)> wrote in message

news:00c201c33ffc$4a34ab20$(E-Mail Removed)...
>> 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?

>.
>

 
Reply With Quote
 
Sue Mosher [MVP]
Guest
Posts: n/a
 
      2nd Jul 2003
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" <(E-Mail Removed)> wrote in message news:0ac901c34026$2756f110$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message

> news:00c201c33ffc$4a34ab20$(E-Mail Removed)...
> >> 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?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
is there a way to add hyperlink fields dynamically to a form? tbrown7777 Microsoft Access VBA Modules 1 7th Jan 2009 02:55 PM
Iterate through dynamically created form fields guido Microsoft ASP .NET 3 16th Jun 2007 02:16 PM
Dynamically choosing form fields Judy Microsoft Access Form Coding 7 25th Jan 2006 06:18 AM
Dynamically Populate Form Fields =?Utf-8?B?SmVk?= Microsoft Frontpage 3 4th Feb 2005 07:18 PM
Dynamically Populate Form Fields =?Utf-8?B?SmVk?= Microsoft Access 0 3rd Feb 2005 06:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:59 AM.