Combo Box (or anything else that might work)

Jonny999

New member
Local time
Today, 00:17
Joined
Jul 30, 2012
Messages
3
Hi,

I am building myself a little Access Database to keep track of Customers calls and i stumble into a problem i cannot resolve.

I have a table of customers that have CustomerName and CustomerCode on it.

I also have a table named CustomerCalls.

What i want is to be able in my CustomerCalls Form to select either the CustomerCode or the CustomerName and all related info appear ( addresse, tel etc.)

I can do it if i have only one combobox but the problem is I want to be capable of selecting either one of them and all info appear. If i select the CustomerCode, i want the CustomerName also automatically completed and if i select CustomerName i want the CustomerCode automatically completed too.

This is because some customers know their Customers Code and some don't so i want to be able to select from either one of those criteria and all related info auto-complete on the form.

Hope i've been clear enough.

Thank you in advance,
 
Welcome to the forum.

You could simply have two combos, bound to the same Control Source. ON e that allows the user to select by Customer Code the Other by Customer Name.

If they are both bound to the same Control Source a change in one will be reflected in the other, see the attached for an example.
 

Attachments

Thank you very much!

This has solved my problem right away.

Nice support there!
 
Just a question about the combos. The database opens in read only mode, so I could not test whether when the user types the first letter of a country name, the name is hilighted. Otherwise, one would have to scroll down through numerous names. Looks good though.
 
Just a question about the combos. The database opens in read only mode, so I could not test whether when the user types the first letter of a country name, the name is hilighted. Otherwise, one would have to scroll down through numerous names. Looks good though.

Did you copy the DB to a trusted location? As the DB should not open in Read Only mode :confused:

However to Answer your question, as you type in a country name the closest match will be selected. If you want the drop down list to appear simply put the following code in the Combo's On Change event;
Code:
Me.ComboName.DropDown
 
Humour me, please, but how do I entrust the download site for Access 2003?
 

Users who are viewing this thread

Back
Top Bottom