Database Reference
In-Depth Information
For Each foundMember In lookupMatches
cboChannel.AddItem foundMember
Next foundMember
End Sub
Private Sub cboChannel_Change()
'we pass this empty collection over to the
'lookUpDimMemberList method to be populated
'with a list of Entity members that are valid with the
'currently selected Channel.
Dim lookupMatches As New Collection
Dim selectDimensionName As String
Dim lookupDimensionName As String
Dim selectedMember As String
selectedMember = cboChannel.Text
selectDimensionName = "Channel"
lookupDimensionName = "Entity"
cboEntity.Clear
'use our previously coded method to get lookup the Entity
member(s) that
'are valid with the currently selected Channel member.
lookupDimMemberList selectedMember, selectDimensionName,
lookupDimensionName, lookupMatches
Dim foundMember As Variant
For Each foundMember In lookupMatches
cboEntity.AddItem foundMember
Next foundMember
End Sub
If you implemented the code correctly here, you should be able to test the Combo
Box selections and find that our company only sells televisions to Latin American
governments and only sells Audio Systems to Schools in north America and EmEA.
10.4.12 Next Steps
By now the ideas for putting this logic to good use should start to flow. The custom
Combo Boxes for Segment, Channel, and Entity are meant to be used as Pov member
selections in a Smart view data entry sheet. By adding the Smart view call hypSetPov
to your Combo Box events, you tie the selections of the Combo Boxes directly to the
Pov of the sheet. here is how it should look in the cboEntity_Change() event:
Private Sub cboEntity_Change()
If Len(cboChannel.Text) > 0 And Len(cboEntity.Text) > 0 Then
svSetPOV
End If
End Sub
In module1, the method svSetPov() should contain:
Public Sub svSetPOV()
Dim svRetVal As Long
Sheet1.Activate
Search WWH ::




Custom Search