Select Multiple columns in combo box

  • Thread starter Thread starter Vic via AccessMonster.com
  • Start date Start date
V

Vic via AccessMonster.com

I have a form which has the following fields on it called “currencyMonthâ€
“invAmt†and “curr†which holds values: GBP, or EUR, etc.

I also have a combo box which is a table of currencies and values listed as
such:

currencyMonth, rate, abbr.
1/1/ 2007 $1.87 GBP
1/1/2007 $1.27 EUR
2/1/2007 $1.90 GBP
2/1/2007 $1.50 EUR

The “abbr†of the table above has the same values as “curr†on the form.

The rate from the table of currencies is different for the currencyMonth.

I’m trying to get the form to function as follows:

afterUpdate of ‘invAmt, have the combo box go to the row matching the
currencyMonth and “curr†on my form.

So, on the form is a text boxâ€currencyMonth of 1/1/2007 and a field named
“curr†of “EURâ€. I need the combo box to go to that record in that row above
but not go to the EUR for 2/1/2007. what I'm trying to get is the rate for
that month and abbr

Does anyone know how I can get this to work? Am I using the correct process
or method?

Should I use a subform instead of a combo box?

Thanks,
Vic
 
Just put the correct filter in your combobox RowSource property, similar to
the following:
select ... where Nz([Forms!ThisFormName!CurrencyMonthControl ,
currencyMonth) = currencyMonth and Nz([Forms!ThisFormName!CurrencyControl ,
curr) = curr

then Access will autofilter the combobox for you.
 
Back
Top