DatabaseTash
Registered User.
- Local time
- Today, 12:59
- Joined
- Jul 23, 2018
- Messages
- 149
Is it possible to add a parameter query to a field that is based on a combo box? The combo box is connected to a table. The one I have set up isn't working.
I would rather not upload the database...
i change the parish field to numeric.
see sample form in the attached.
view the code of the combo afterupdate event.
You left out the form so that part can't be tested anyway.
However the query gives no results if I enter a name such as Barolin or Gregory. The reason is that you are using table level lookups for the Parish fields. So although the data is displayed as a parish name, it is actually stored as a number - the PK field from tblParishNames.
So to get results for e.g. Barolin I have to type 1... which is confusing!
Recommend you scrap table level lookups, display the actual value in the table and call it ParishID. Now create a query with both tables joined by the ID field.
Your parameter query will then work
Thanks for the reply Ridders. When you say actual value do you mean to manually enter the value each time rather than choosing from the combo or do you mean change it to a value list?