Populating Cmbo Box

JPearson

Registered User.
Local time
Today, 09:27
Joined
Dec 23, 2009
Messages
54
I am about to go bonkers on this one. I have a form with 3 combo boxes.
It is set up so the 1st is auto populated with the departements. second(Jobs) has none, and 3rd has employee names. I have no issues getting the drill down to work from select dept and it populates correct Jobs, select the Job and it repopulates the employee name with the filtered list.
Since the EE list is populated on load I would like to select the employee name and auto populate the correct data in the department and Job.

The employee name box is driven by a 4 column query that produces
ID Name Dept Job

I can get the Dept to populate using the code below but the Job always comes back Null.

Help?
Code:
Private Sub cboEEName_Change()
    
    
      
'Populates Dept value correctly       
         Me.cboDept.Value = Me.cboEEName.Column(2, Me.cboEEName.ListIndex)
         
'Does not populate.......
         Me.cboJob.Value = Me.cboEEName.Column(3, Me.cboEEName.ListIndex)

    
End Sub

Thanks
-JP
 
Make sure the column count property of the name combo is 4.
 
Thanks. It was the column count property that was set wrong.

Now that I have changed that I see the EEname, Dept, and Job all in the EEName cbo. How can I still pull that data yet only display the Employee name in the EEName cbo?
 
Set the Column Width of those corresponding fields to zero (0).
 
Nevermind on the display. I figured that out.

Much Thanks on the count. Never even occured to me that it was being limited there.

Thanks again!
-JP
 
Much Thanks on the count. Never even occured to me that it was being limited there.


No problemo; it didn't occur to me either until it happened to me and I beat my head against the wall for way too long before figuring out this was the problem. :eek:
 
Heh. I understand.. I was almost to that point myself!!!!
 

Users who are viewing this thread

Back
Top Bottom