How can I install drop down, record selectors (plural) at the top of a form?
What I have tried so far: I found this answer which shows how to do this with one selector, but the method doesn’t appear to lend itself to multiple selectors. Also the form’s record back and forward buttons don’t work as expected.
Example: Say you have a table of customers, where each customer has a first name, a last name, and a phone#. I want a form to lookup a customer either by first name, or by last name. So at the top of this form I want two pull down (or drop down) boxes to quickly select a customer. The first pull down is organized (sorted) by “first-name last-name”, and the second one is organized by “last-name, first-name”. We can call these boxes FindByFirstLast
and FindByLastFirst
.
When you click on FindByFirstLast
, a drop down list of all customers appears sorted by first name, then by last name. When I select a customer, the form below updates to be able to edit the fields for this customer (like their Phone number and address) .
I have used something like this in MS Access for years, and before that in dbase and other databases. In MS Access the “changed” event fires from the drop down list (they call them “Combo Boxes”) and runs a visual basic sub to set the form’s record via a “bookmark”.