Dlookup
Hello,
I have a form with an unbound field cboCurrency
I want this field cboCurrency to list the available currencies per COID on tblBankAccounts.
The field in tblBankAccounts is [currency]. So basically if there are 3 currencies per the COID (ie records) then I would want to show those 3 currencies to and be able to choose 1 of them. I want to limit the choices available so I dont accidentally enter a currency that is not setup per that COID.
How can I do this? There might be a better way to do this than Dlookup.
I hope I explained correctly but I suspect I did not.
Let me know if you have questions.
here is a hack since your form is Continuous, there is actually 1 currency combobox.
so changing the rowsource of the combo affects the entire form, making some
of the "values" of combo disappear.
i change the query qryPmtProposal to add currency from currency table (the new calculated field is CY).
next i added a textbox (txtCurrencyName, see it in property window) and add CY as it controlsource. in the property i also disallow Tabbing to this control. then i right-click and Position->bring to front. While the currency combo the Position is sent to back. I align both controls correct (reducing the width of the textbox).
next i remove the Border of txtCurrencyName and add code on it's GotFocus to move the focus to the combobox.
next i Overlay (the txtbox on top) the txtCurrencyName to the Currency combobox.
it is now correctly displaying (hopefully).