Syncronizing 3 combo or list boxes

G

Guest

Hi,

I have successfully created a sync between 2 combo boxes using the
"AfterUpdate" feature on the staff no combo box, by following info on MS site
and suggestions here.

However, I want to sync 3 boxes in total, one staff no, one Surname and a
third called FirstName.
I want it to auto insert surname & FirstName in different fields (combo
boxes) when staff no selected from drop down list.
Any suggestions very welcome & appreciated.

Thanks,

Kevin
 
D

Douglas J. Steele

I don't understand. Why do you want 3 separate combo boxes if they're all
pointing to a piece of information about the same employee? Why not have all
3 pieces of information in one combo box. Once you've selected a particular
employee, you can display the additional pieces of information in unbound
text boxes, using the Column collection in the combo box's AfterUpdate
event.

For example, if the Surname is in the 2nd column of the combo box, and the
Firstname is in the 3rd column, you'd use something like:

Private Sub MyComboBox_AfterUpdate()

Me.txtSurname = Me.MyComboBox.Column(1)
Me.txtFirstname = Me.MyComboBox.Column(2)

End Sub

(Note that the Column collection starts at 0, so that the 2nd column is
Column(1))
 
G

Guest

Thanks Doug, I must admit to being a newbie to all this.
Your advice has helped me out.

Thanks again,

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

combo box select 4
Combo box form 1
Combo Box not working 2
Hiding scroll bar in combo box 7
limiting entries in a subform combo box 2
Multiple Search boxes 2
Combo box help please 5
Combo Box question. 3

Top