Follow up: Make a combo box dependant on another

Status
Not open for further replies.
Q

QW15IEJyb29rcw

Hi Sue,

Regarding the previous question, could I add more code to have a third combo

box relate to the second?

Thanks,

Amy
 
Again, that's going to depend on whether the 2nd combo box is bound or not.

If it is, you add another Case block to the CustomPropertyChange event

handler to handle the change in that property. If not, you use the control's

Click event. See the previously suggested article.

Sue Mosher

"Amy Brooks" <AmyBrooks> wrote in message

news:044BE2A3-61C3-47AA-A1C1-29B3BEB13388@microsoft.com...
> Hi Sue,

> Regarding the previous question, could I add more code to have a third
> combo
> box relate to the second?

> Thanks,
> Amy
 
Bound is when it saves the selections when closed?

If so, I think they are bound.

If they are, how would I go about adding another case block? There are more

values now, is that still the way to go?

"Sue Mosher [MVP]" wrote:


> Again, that's going to depend on whether the 2nd combo box is bound or not.
> If it is, you add another Case block to the CustomPropertyChange event
> handler to handle the change in that property. If not, you use the control's
> Click event. See the previously suggested article.

> > Sue Mosher
> > >

> "Amy Brooks" <AmyBrooks> wrote in message
> news:044BE2A3-61C3-47AA-A1C1-29B3BEB13388@microsoft.com...
> > Hi Sue,
> > Regarding the previous question, could I add more code to have a third
> > combo
> > box relate to the second?
> > Thanks,
> > Amy


>
 
Yes, that's one of the characteristics of bound controls.

The second Case block to handle a second property's value changes would go

right after the first, as in the example at

http://www.outlookcode.com/article.aspx?ID=38.

Sue Mosher

"Amy Brooks" <AmyBrooks> wrote in message

news:368AA6CF-2374-4D66-BBE8-622DAC1E50E4@microsoft.com...
> Bound is when it saves the selections when closed?
> If so, I think they are bound.
> If they are, how would I go about adding another case block? There are
> more
> values now, is that still the way to go?

> "Sue Mosher [MVP]" wrote:
>
> > Again, that's going to depend on whether the 2nd combo box is bound or
> > not.
> > If it is, you add another Case block to the CustomPropertyChange event
> > handler to handle the change in that property. If not, you use the
> > control's
> > Click event. See the previously suggested article.
>

>> > > Sue Mosher
> > >> >> >
>
>> "Amy Brooks" <AmyBrooks> wrote in message
> > news:044BE2A3-61C3-47AA-A1C1-29B3BEB13388@microsoft.com...
> > > Hi Sue,
> >> > Regarding the previous question, could I add more code to have a third
> > > combo
> > > box relate to the second?
> >> > Thanks,
> > > Amy

>

>
>>
 
So maybe something like:

---------------------------------------------------------------Sub Item_CustomPropertyChange(ByVal Name)

Select Case Name

Case "Division"

Call SetSubDivision

Case "SubDivision"

Call SetThirdBox

End Select

End Sub

___________

Sub SetSubDivision

Set objInsp = Item.GetInspector

Set objPage = objInsp.ModifiedFormPages("General")

Set SubDivision = objPage.Controls("cboSubDivision")

Select Case Item.UserProperties("Division")

Case "Ambulance"

SubDivision.List = Split("Air,NHS,Private,Vehicle Builder,Voluntary",",")

Case "Export"

SubDivision.List = Split("Distributor,End User,Ferno Group",",")

Case "Hospital"

SubDivision.List = Split("Distributor,MOD,NHS,Private",",")

Case "Industry"

SubDivision.List = Split("N/A",",")

Case "Mortuary"

SubDivision.List = Split("Distributor,Funeral Director",",")

End Select

End Sub

___________

Sub SetThirdBox

Set objInsp = Item.GetInspector

Set objPage = objInsp.ModifiedFormPages("General")

Set ThirdBox = objPage.Controls("cboThirdBox")

Select Case Item.UserProperties("SubDivision")

Case "NHS"

ThirdBox.List = Split("Option A, Option B",",")

Case "Private"

ThirdBox.List = Split("Option C, Option D",",")

(etc.....)

End Select

End Sub

---------------------------------------------------------------"Sue Mosher [MVP]" wrote:


> Yes, that's one of the characteristics of bound controls.

> The second Case block to handle a second property's value changes would go
> right after the first, as in the example at
> http://www.outlookcode.com/article.aspx?ID=38.

> > Sue Mosher
> > >

> "Amy Brooks" <AmyBrooks> wrote in message
> news:368AA6CF-2374-4D66-BBE8-622DAC1E50E4@microsoft.com...
> > Bound is when it saves the selections when closed?
> > If so, I think they are bound.
> > If they are, how would I go about adding another case block? There are
> > more
> > values now, is that still the way to go?
> > "Sue Mosher [MVP]" wrote:
> >
> >> Again, that's going to depend on whether the 2nd combo box is bound or
> >> not.
> >> If it is, you add another Case block to the CustomPropertyChange event
> >> handler to handle the change in that property. If not, you use the
> >> control's
> >> Click event. See the previously suggested article.
> >
> >> > >> Sue Mosher
> >> > >> > >> > >
> >
> >> "Amy Brooks" <AmyBrooks> wrote in message
> >> news:044BE2A3-61C3-47AA-A1C1-29B3BEB13388@microsoft.com...
> >> > Hi Sue,
> >> >> > Regarding the previous question, could I add more code to have a third
> >> > combo
> >> > box relate to the second?
> >> >> > Thanks,
> >> > Amy
> >
> >
> >>


>
 
Exactly. That's how you build on what you've learned!

Sue Mosher

"Amy Brooks" <AmyBrooks> wrote in message

news:C60F2640-4A07-4E46-9E18-7C11B3D8FF2F@microsoft.com...
> So maybe something like:

> ---------------------------------------------------------------------------------------------> Sub Item_CustomPropertyChange(ByVal Name)
> Select Case Name
> Case "Division"
> Call SetSubDivision
> Case "SubDivision"
> Call SetThirdBox
> End Select
> End Sub
> ___________

> Sub SetSubDivision
> Set objInsp = Item.GetInspector
> Set objPage = objInsp.ModifiedFormPages("General")
> Set SubDivision = objPage.Controls("cboSubDivision")
> Select Case Item.UserProperties("Division")
> Case "Ambulance"
> SubDivision.List = Split("Air,NHS,Private,Vehicle Builder,Voluntary",",")
> Case "Export"
> SubDivision.List = Split("Distributor,End User,Ferno Group",",")
> Case "Hospital"
> SubDivision.List = Split("Distributor,MOD,NHS,Private",",")
> Case "Industry"
> SubDivision.List = Split("N/A",",")
> Case "Mortuary"
> SubDivision.List = Split("Distributor,Funeral Director",",")
> End Select
> End Sub
> ___________

> Sub SetThirdBox
> Set objInsp = Item.GetInspector
> Set objPage = objInsp.ModifiedFormPages("General")
> Set ThirdBox = objPage.Controls("cboThirdBox")
> Select Case Item.UserProperties("SubDivision")
> Case "NHS"
> ThirdBox.List = Split("Option A, Option B",",")
> Case "Private"
> ThirdBox.List = Split("Option C, Option D",",")
> (etc.....)
> End Select
> End Sub
> ---------------------------------------------------------------> "Sue Mosher [MVP]" wrote:
>
> > Yes, that's one of the characteristics of bound controls.
>

>> The second Case block to handle a second property's value changes would
> > go
> > right after the first, as in the example at
> > http://www.outlookcode.com/article.aspx?ID=38.



>

>> "Amy Brooks" <AmyBrooks> wrote in message
> > news:368AA6CF-2374-4D66-BBE8-622DAC1E50E4@microsoft.com...
> > > Bound is when it saves the selections when closed?
> > > If so, I think they are bound.
> > > If they are, how would I go about adding another case block? There are
> > > more
> > > values now, is that still the way to go?
> >> > "Sue Mosher [MVP]" wrote:
> >> >> Again, that's going to depend on whether the 2nd combo box is bound or
> > >> not.
> > >> If it is, you add another Case block to the CustomPropertyChange event
> > >> handler to handle the change in that property. If not, you use the
> > >> control's
> > >> Click event. See the previously suggested article.
> > >
>> >> "Amy Brooks" <AmyBrooks> wrote in message
> > >> news:044BE2A3-61C3-47AA-A1C1-29B3BEB13388@microsoft.com...
> > >> > Hi Sue,
> > >>> >> > Regarding the previous question, could I add more code to have a
> > >> > third
> > >> > combo
> > >> > box relate to the second?
 
Great stuff, thanks for all your help Sue!

"Sue Mosher [MVP]" wrote:


> Exactly. That's how you build on what you've learned!
> > Sue Mosher
> > >

> "Amy Brooks" <AmyBrooks> wrote in message
> news:C60F2640-4A07-4E46-9E18-7C11B3D8FF2F@microsoft.com...
> > So maybe something like:
> > ---------------------------------------------------------------------------------------------> > Sub Item_CustomPropertyChange(ByVal Name)
> > Select Case Name
> > Case "Division"
> > Call SetSubDivision
> > Case "SubDivision"
> > Call SetThirdBox
> > End Select
> > End Sub
> > ___________
> > Sub SetSubDivision
> > Set objInsp = Item.GetInspector
> > Set objPage = objInsp.ModifiedFormPages("General")
> > Set SubDivision = objPage.Controls("cboSubDivision")
> > Select Case Item.UserProperties("Division")
> > Case "Ambulance"
> > SubDivision.List = Split("Air,NHS,Private,Vehicle Builder,Voluntary",",")
> > Case "Export"
> > SubDivision.List = Split("Distributor,End User,Ferno Group",",")
> > Case "Hospital"
> > SubDivision.List = Split("Distributor,MOD,NHS,Private",",")
> > Case "Industry"
> > SubDivision.List = Split("N/A",",")
> > Case "Mortuary"
> > SubDivision.List = Split("Distributor,Funeral Director",",")
> > End Select
> > End Sub
> > ___________
> > Sub SetThirdBox
> > Set objInsp = Item.GetInspector
> > Set objPage = objInsp.ModifiedFormPages("General")
> > Set ThirdBox = objPage.Controls("cboThirdBox")
> > Select Case Item.UserProperties("SubDivision")
> > Case "NHS"
> > ThirdBox.List = Split("Option A, Option B",",")
> > Case "Private"
> > ThirdBox.List = Split("Option C, Option D",",")
> > (etc.....)
> > End Select
> > End Sub
> > ---------------------------------------------------------------------------------------------> > "Sue Mosher [MVP]" wrote:
> >
> >> Yes, that's one of the characteristics of bound controls.
> >
> >> The second Case block to handle a second property's value changes would
> >> go
> >> right after the first, as in the example at
> >> http://www.outlookcode.com/article.aspx?ID=38.

>
> >
> >> "Amy Brooks" <AmyBrooks> wrote in message
> >> news:368AA6CF-2374-4D66-BBE8-622DAC1E50E4@microsoft.com...
> >> > Bound is when it saves the selections when closed?
> >> > If so, I think they are bound.
> >> > If they are, how would I go about adding another case block? There are
> >> > more
> >> > values now, is that still the way to go?
> >> >> > "Sue Mosher [MVP]" wrote:
> >> >> >> Again, that's going to depend on whether the 2nd combo box is bound or
> >> >> not.
> >> >> If it is, you add another Case block to the CustomPropertyChange event
> >> >> handler to handle the change in that property. If not, you use the
> >> >> control's
> >> >> Click event. See the previously suggested article.
> >> >
> >> >> "Amy Brooks" <AmyBrooks> wrote in message
> >> >> news:044BE2A3-61C3-47AA-A1C1-29B3BEB13388@microsoft.com...
> >> >> > Hi Sue,
> >> >> >> >> > Regarding the previous question, could I add more code to have a
> >> >> > third
> >> >> > combo
> >> >> > box relate to the second?


>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
C Outlook 365 Can you change the follow up colour? Using Outlook 1
justicefriends How to set a flag to follow up using VBA - for addressee in TO field Outlook VBA and Custom Forms 11
R Follow up button doesn't working neither the reminders in BCM BCM (Business Contact Manager) 0
A Flag Message for Follow Up after sending Outlook VBA and Custom Forms 1
V Changing default date for task follow-up buttons Using Outlook 2
M Setting flag follow up for next business day Outlook VBA and Custom Forms 1
O Outlook 2016 follow-up flags--how can I add dates? Using Outlook 1
G Flag for Follow Up with a customized duetime Using Outlook 1
G Follow up and Using Outlook 1
K check for sender, follow to my personal adress and delete the sent folder. Outlook VBA and Custom Forms 1
oliv- HOW TO GET PROPERTIES FOLLOW UP Outlook VBA and Custom Forms 7
D No Follow up when making new form Outlook VBA and Custom Forms 2
rc4524 Create auto follow-up reminder email for already sent messages Outlook VBA and Custom Forms 1
smokiibear follow-up flag fro Tasks in Outlook 2010 Using Outlook 5
N Adding a note to a e-mail which has been marked as follow up Using Outlook 1
A Post Form Follow Up Flag Using Outlook 4
J How to set a flag to follow up using VBA for outlook 2003 Using Outlook 10
F Apply Follow up flag ONLY to the people cc'd. Using Outlook 1
R Flagged for Follow Up Search folder MIA after PST export/import Using Outlook 1
M adding marked emails under follow-up Using Outlook 2
2 Flag for Follow up or create new task Using Outlook 1
M How can I customize the Follow Up Flag message in Quick Steps? Using Outlook 1
N Mark or follow up emails in shared mailbox Using Outlook 2
H "For Follow Up" items missing. Using Outlook 5
B Multiple follow ups Using Outlook 1
S Adding follow flag for me by macro (MSO2007) Outlook VBA and Custom Forms 3
R List folders in a combo box + select folder + move emails from inbox to that folder + reply to that email Outlook VBA and Custom Forms 1
G Using Data From Combo Box in Appointment Body Outlook VBA and Custom Forms 6
P Custom Outlook form_Validations in combo box Outlook VBA and Custom Forms 0
F Outlook 2010 - outlook userform and combo boxes Using Outlook 9
S Outlook form - Combo box for deciding who to send form to Using Outlook 1
M details with the combo box Exchange Server Administration 3
M Need help with combo boxes in messages! Using Outlook 10
L Combo Box Using Outlook 157
Q Make a combo box dependant on another Outlook VBA and Custom Forms 5
Q Load a recipient based on a value in a combo box Outlook VBA and Custom Forms 7
M Outlook 2007 / Vista / Windows XP best combo needed BCM (Business Contact Manager) 2
P turn off the default "all day" check box in new calendar items. How? Using Outlook 1
S New Email "From" box stopped working Using Outlook 0
T Outlook 365 Search Box reverting to old location Using Outlook 2
J How do you disable address search box when typing @ in body of email? Using Outlook 0
L Is there a way to completely disable the "archive" box? Using Outlook 1
M Reverting The Outlook Search Box Location (or other undesired additions) Using Outlook 1
P outlook 2008 search box criteria couldn't be saved Using Outlook 2
Terry Sullivan E-Mails Sent Using a Group Box Result in 70 Kickbacks Using Outlook 4
N Private check box in table view Using Outlook 0
Commodore Folders always closed in move/copy items dialog box Using Outlook 3
P IMAP Folders Dialog Box Using Outlook 1
C Custom Outlook Form - Populate Information from Radio Button / Check Box Using Outlook 0
J Program Checkbox that will activate a text box in a Outlook fallible form. Outlook VBA and Custom Forms 1

Similar threads

Back
Top