Combo boxes

Joe B.

Registered User.
Local time
Today, 02:32
Joined
Mar 16, 2012
Messages
34
I have a form where the user can enter the Foreign Exchange rates for different dates. The fields are Date, Currency Name, Currency Code, and Rate. Is there a way to set up a Combo box where the selection of the currency name defaults the Currency Code and vice versa?

Thanks again.

Joe B.
 
I'm pretty sure it can be done.

But just so we are working from the same page, can you outline step by step what you want to happen?
 
There is a table which contains the Currency Name and the Currency Code for which I created 2 combo boxes; one for Currency Name and one for Currency Code.

I then created a form with these fields; Date, Currency Name, Currency Code, and Foreign Exchange rate to populate a Table call Foreign Exchange Rates.

The user enters the form and inputs the Date, then uses the Combo box on the "Currency Name" field and selects Japanese Yen. The associated "Currency Code" for Japanese Yen in JPY. I would like the selection of the Currency Name to drive the selection of the Currency Code. Selecting Currency Name Japanese Yen populates the Currency Code field with JPY
As the form is now, the user must enter both the Currency Name and the Currency Code and can select Codes which do not apply to the Name; i.e. Japanese Yen / USD.
 
You shouldn't need two Combos. Given that Currency and Currency Code are intimately linked you should be able to pick up both in one combo. You won't necessarily have to show both in the combo. You can then use the following to populate an unbound Text Box with the currency code for the currently selected Currency;
Code:
=[Comboname].Column([B][COLOR="Red"]x[/COLOR][/B])
Where x represents the column in your combo that holds the Currency code. Remember that the columns in a combo are numbered from Zero on up. The first column (often hidden and bound) is column zero, the second column one and so on.

The attached demonstrates this principal.
 

Attachments

Users who are viewing this thread

Back
Top Bottom