combo box code

Paul Cooke

Registered User.
Local time
Today, 23:41
Joined
Oct 12, 2001
Messages
288
Apologies for what may seem a 'stupid' question but I think my brain has gone into sleep mode !!

I have a 2 combo boxes on a form - ' cboProductCode' & 'cboProduct'

If i enter a code eg. Dr001 in cboProductCode I want the related product to populate cboProduct with the item that code relates to.

At the moment the cboProductCode shows the codes from the table
and
cboProducts shows the products from the same table.

I am sure this is a simple query but it is not simple to me at the moment for some reason !!

many thanks for any advice offered
 
Hi, Paul.

Assuming that I have table named "tblUsers" and a form named "Mange Users", I can filter the second combo box by adding a reference to the form name and control name as the criteria in the field of my query that holds the value returned by the first combo box.

In know that sounds confusing so I have attached a graphic of the QBE when defining an sql to use as the Record Source for a second combo box or even a list box.

Hope this helps.
 

Attachments

  • QBE view.gif
    QBE view.gif
    17.1 KB · Views: 102
Last edited:
Many thanks Byron - its been a long day !! Will speak to you soon
 
No probleml, Paul.

Always gald to help.
 

Users who are viewing this thread

Back
Top Bottom