![]() |
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,
I have two combo boxes, one named Division, the other named Sub-Division. I want to make it so that if you select (for example) Ambulance from the Division list, the Sub-Division list will only show related items, like NHS, Private, Air. The lists are as follows: Ambulance Air NHS Private Voluntary Vehicle Builder Export Distributor End User Group Hospital NHS Private Distributor Industry N/A Mortuary Distributor Funeral Director The code I have so far is: ------------------------------------------------------------------------------------------------ Sub Item_CustomPropertyChange(ByVal Name) Select Case Name Case "cboDivision" Call SetSubDivision End Select End Sub _____________________________________________ Sub SetSubDivision Set objInsp = Item.GetInspector Set objPage = objInsp.ModifiedFormPages("General") Set Division = objPage.Controls("cboSubDivision") Select Case Item.UserProperties ("cboDivision") Case "Ambulance" cboSubDivision.List = Split("Air,NHS,Private,Vehicle Builder,Voluntary",",") Case "Export" cboSubDivision.List = Split("Distributor,End User,Ferno Group",",") Case "Hospital" cboSubDivision.List = Split("Distributor,MOD,NHS,Private",",") Case "Industry" cboSubDivision.List = Split("N/A",",") Case "Mortuary" cboSubDivision.List = Split("Distributor,Funeral Director",",") End Select End Sub ------------------------------------------------------------------------------------------------ I'm not sure if this is correct, or where to put it. Help would be appreciated! Thanks, Amy |
Ads |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |
If then - do while - vlookup combo | csjames | Outlook and VBA | 1 | June 28th 07 10:18 PM |
Combo box | skar3000 | Outlook - Using Forms | 3 | June 15th 07 01:14 PM |
Populate a combo box | Steffkm | Outlook - Using Forms | 4 | March 14th 06 08:28 PM |
Auto insert a value dependant on the previous fields content | Brizey112 | Outlook - Using Forms | 1 | February 23rd 06 06:22 PM |