I am trying to pass a whole recordset into a query. I have made a form, with a listbox that is linked to a table that has 2 columns: Country and CountryID.
When I select the Country on the form, i need the Country and the CountryId to be passed to a query.
Could someone help me on How I can set a variable in VBA that would take it's value from the corresponding recordset when I select the Country in the Listbox.
Example:
Country CountryID
Argentina AG
Brazil BZ
United State US
Given the name for these 2 variables is list.country and list.countryId, how do I make vba.countryId = list.countryId for the corresponding vba.country = list.country?