display unique values in combobox based on a cell

roninn75

New member
Joined
Jan 17, 2013
Messages
11
Reaction score
0
Points
0
hi i have a workbook with a form and some dependant comboboxes on. the last dependant combobox should check if there are a specific value in a cloumn, skip it and only list that without the value.
below i am showing what the sheet look like...

A1 = DISTRICT (combocbox1)
B1 = TOWN (COMBOBOX 2)
C1 = NAME (COMBOBOX3)
D1 = NUMBER (COMBOBOX 4)

the functionality for the dependant comboboxes is sorted out, if i click on combobox1 it pulls up the unique list of values for column A.
Combobox 2 will only pull out the values related to combobox 1, etc.
Column E is a date stamp which is automatically inserted into the sheet, and column F is what is inserted if the row has been processed. however, this is where i need assistance, if i pull up combobox 4, it will pull up everything in that column related to that Name in combobox 3. i need it to only pull up those rows that does not have "true" marked in column F.

ABCDEFG
1easta townjohn12310 aug 2013true
2eastb townpeter12410 aug 2013
3eastb townmike12911 aug 2013
4westc townjohn13112 aug 2013
5easta townbrad13312 aug 2013true
6east b townpeter13512 aug 2013true
7eastb townmike13612 aug 2013
 

millz

New member
Joined
Aug 6, 2013
Messages
32
Reaction score
0
Points
0
Location
Singapore
How about providing the code that you currently have for these combo boxes? Or provide a sample workbook.
 

roninn75

New member
Joined
Jan 17, 2013
Messages
11
Reaction score
0
Points
0
View attachment Book1(2).xlsm

hi Millz
on the Multipage Page 2 form the data is pulled from the Resultant sheet. When the Name is selected i want to only display those numbers that does not have "TRUE" marked on the Resultant sheet column H.
Note: the multipage forms load based on priviledges added on the Source sheet using Environ$("USERNAME"). just add yours under Source sheet "J"

thank you.
 

millz

New member
Joined
Aug 6, 2013
Messages
32
Reaction score
0
Points
0
Location
Singapore
Hi roninn, to be honest, this is some pretty decent coding done, and I don't know why you couldn't figure how to ignore those with "TRUE". Did you just take over this project or something?

Anyway, in the sub Private Sub BxDC_StaOIC_AfterUpdate(), add this condition:
Code:
            Do
                If InStr(1, Cl.Offset(0, 5), "true", vbTextCompare) = 0 Then
                    .List_DC_StaIncNo.AddItem Cl.Offset(0, 1).Value
                    'MsgBox ("select inc no's: " & Cl.Offset(0, 1).Value)
                End If
            Set Cl = rSource.FindNext(Cl)
            Loop While Not Cl Is Nothing And Cl.Address <> ClAddress
 

roninn75

New member
Joined
Jan 17, 2013
Messages
11
Reaction score
0
Points
0
hi Millz

thank you for that, yes i have inherited this project...
 
Top