link one combo box with another

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am creating a form which shows pairs of dogs. Each dog is selected from a
drop down box. I need the owner of each dog to show on the form (to be
viewed only). I have a table for dogs and a table for owners. Each owner on
the owner table has an auto number assigned. The table for dogs shows that
each dog has an owner by that owner number. On the form, when the dog is
selected, how do I get the owner for that dog to pop up? There will be many
pairs of dogs and I need to see the owner for each dog.
 
In the dog combobox, you should have two columns, dog and OwnerNumber.
I would set the second column invisible by setting the ColumnCOunt
property to 2 and the ColumnWidths property to something like 1"; 0".

Assuming you want the owner's number to be displyed in a textbox, in
the dog combobox's AfterUpdate event enter:
Me.txtOwner=Me.cboDog.Column(1)

HTH,
Barry
 
Back
Top