link one combo box with another

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.
 
B

Barry Gilbert

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
 

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

Top