![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi Sue,
Regarding the previous question, could I add more code to have a third combo box relate to the second? Thanks, Amy |
Ads |
#2
|
|||
|
|||
![]()
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, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Amy Brooks" wrote in message ... Hi Sue, Regarding the previous question, could I add more code to have a third combo box relate to the second? Thanks, Amy |
#3
|
|||
|
|||
![]()
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, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Amy Brooks" wrote in message ... Hi Sue, Regarding the previous question, could I add more code to have a third combo box relate to the second? Thanks, Amy |
#4
|
|||
|
|||
![]()
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, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Amy Brooks" wrote in message ... 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, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Amy Brooks" wrote in message ... Hi Sue, Regarding the previous question, could I add more code to have a third combo box relate to the second? Thanks, Amy |
#5
|
|||
|
|||
![]()
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, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Amy Brooks" wrote in message ... 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, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Amy Brooks" wrote in message ... Hi Sue, Regarding the previous question, could I add more code to have a third combo box relate to the second? Thanks, Amy |
#6
|
|||
|
|||
![]()
Exactly. That's how you build on what you've learned!
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Amy Brooks" wrote in message ... 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" wrote in message ... 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" wrote in message ... Hi Sue, Regarding the previous question, could I add more code to have a third combo box relate to the second? |
#7
|
|||
|
|||
![]()
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, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Amy Brooks" wrote in message ... 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" wrote in message ... 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" wrote in message ... Hi Sue, Regarding the previous question, could I add more code to have a third combo box relate to the second? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Make a combo box dependant on another | Amy Brooks | Outlook - Using Forms | 5 | June 2nd 09 02:52 PM |
Make a combo box dependant on another | Amy Brooks | Outlook and VBA | 0 | June 2nd 09 12:02 PM |
Outlook 2003 - Move E-mail to Folder Using Rules (Dependant on Sender& When Received) | [email protected] | Outlook - General Queries | 5 | January 2nd 08 10:48 PM |
Combo box | skar3000 | Outlook - Using Forms | 3 | June 15th 07 01:14 PM |
Auto insert a value dependant on the previous fields content | Brizey112 | Outlook - Using Forms | 1 | February 23rd 06 06:22 PM |