Shaitan00
10-28-2005, 09:06 AM
This should be easy to explain but I assume the solution won't be so simple...
Given a form [frmMain] which has a DataCombo Box [dcbCustomer] which is currently populated by a single RecordSet [oRecsC] which has the list of CUSTOMERS as shown below
Dim oRecsC As New ADODB.Recordset
Set oRecsC = SearchC
Set DcbCustomer.RowSource = oRecsC
DcbCustomer.ListField = oRecsC(0).Name
Thing is there is another RecordSet [oRecsG] that has a list of GROUPS that I also want to add to this DataCombo Box - thus this is my first question, how can I add more then one RecordSet to the DataCombo Box?
Now comes the REAL hard/fun part - I need to find a way to differentiate between the two lists [a CUSTOMER or a GROUP] both visually [maybe make the GROUP entires BOLD or COLORED or ANYTHING...] and via CODE [if a CUSTOMER is selected do this, if a GROUP is selected do that].
Is this possible? Is there a better way to do it? I have been trying to get this to work for a while now and have been completly unable.
So, in the dcbCustomer if the user selects (Private Sub DcbC_Change() event) a CUSTOMER (which originated from the oRecsC list) then do X, if the user selects a GROUP (which originated from the oRecsG list) then do Y.
At the same time if the GROUPS were BOLDED in the list or something so the user can see "this is a Customer and this is a Group" it would be amazing .. I need some way to visually make the difference also.
Any help/hints would be much appreciated, thanks
Given a form [frmMain] which has a DataCombo Box [dcbCustomer] which is currently populated by a single RecordSet [oRecsC] which has the list of CUSTOMERS as shown below
Dim oRecsC As New ADODB.Recordset
Set oRecsC = SearchC
Set DcbCustomer.RowSource = oRecsC
DcbCustomer.ListField = oRecsC(0).Name
Thing is there is another RecordSet [oRecsG] that has a list of GROUPS that I also want to add to this DataCombo Box - thus this is my first question, how can I add more then one RecordSet to the DataCombo Box?
Now comes the REAL hard/fun part - I need to find a way to differentiate between the two lists [a CUSTOMER or a GROUP] both visually [maybe make the GROUP entires BOLD or COLORED or ANYTHING...] and via CODE [if a CUSTOMER is selected do this, if a GROUP is selected do that].
Is this possible? Is there a better way to do it? I have been trying to get this to work for a while now and have been completly unable.
So, in the dcbCustomer if the user selects (Private Sub DcbC_Change() event) a CUSTOMER (which originated from the oRecsC list) then do X, if the user selects a GROUP (which originated from the oRecsG list) then do Y.
At the same time if the GROUPS were BOLDED in the list or something so the user can see "this is a Customer and this is a Group" it would be amazing .. I need some way to visually make the difference also.
Any help/hints would be much appreciated, thanks