Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box parameters from combo box

Status
Not open for further replies.

lachesis

Technical User
Sep 25, 2002
138
NZ
I have read extensively on this topic, including here, and I'm close to a solution, but no cigar... yet!

I have multiple combo boxes cboCurrencyType which I want to filter from another combo box cboCurrencyPeriod. The idea is that the CurrencyType boxes let the user select the type of currency they want to use (for offshore manufacture eg. USD, AUD etc.) In order to compare item costs across countries, one rate from each country applies in a given period - the rate chosen is determined for the item by CurrencyPeriod (eg. 2004/02)

cboCurrencyPeriod
column(0) = cu_YEAR & "/" & cu_MONTH
column(1) = cu_YEAR
column(2) = cu_MONTH

cboCurrencyType
column(0) = cu_ID
column(1) = cu_TYPE
column(2) = cu_YEAR
column(3) = cu_MONTH

In the rowsource query for cboCurrencyType I am applying the following criteria:

cu_YEAR = [forms]![fmItems]![cboCurrencyPeriod].column(1)
cu_MONTH = [forms]![fmItems]![cboCurrencyPeriod].column(2)

These criteria are not working and returning the error "Undefined function in expression", making reference to the above criteria.

Access will not let me put '.value' on the end of these criteria, as I thought syntactically this would resolve the problem, but no.

It seems (????) to be a syntactical problem to me, but I could be wrong. Any help please....!

L.
 
the RowSource is a string of the form

"SELECT * from 'MyTable' WHERE .....;"

rollie@bwsys.net

You are speaking 'people' when you need to speak SQL.
 
Sorted this one out myself! I'm so proud of me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top