Two Combo Boxes

N

Nigel

Is there a way to have two combo boxes in the header of a form to search and
for each one to reflect the criteria of the other. I'm thinking specifically
of a concatenated name field and their PeronalID field so that I can find
data either way.

Thanks
 
J

Jeff Boyce

Nigel

Here's another possibility...

You could add an option box with two choices: "name" and "ID". In the
AfterUpdate event of that Group/option, selecting "name" results in the
combobox's Source changing to look up names. Selecting "ID" changes the
combobox Source to look up IDs.

Then your only issue might be ensuring that the AfterUpdate event of the
combobox "knows" how to handle grabbing the correct record for display,
depending on which Source was used. Personally, I'd use ID as the first
column and the concatenated name as the second, but in the "name" version,
I'd make the column width of the ID "0" so it doesn't show, but still gets
used to look up records.

Best of luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top