Problem with Search Form

Zomad

New member
Local time
Today, 23:15
Joined
Sep 9, 2008
Messages
2
Hello,

I've adapted Gromit's Search Form Example and modified it for my purpose.

I modified it to make a search for a list of doctors, based on their names, specialization, and regions.

I was able to get the form to search by name. However, I am running into an issue - the Specialty menu box search is nonfunctional.

Can anyone help me pinpoint the source of errors? Much appreciate your help!
 

Attachments

Here is your sample Database back to you (attached).

The returned sample DB does not utilize your BuildFilter function nor does it utilize any of your Queries. The Doctor Name within the Search Form has been changed from a Text Box to a Combo Box so that a doctors name can be selected rather than relying on a User to enter the name correctly. The RowSource queries have been simplified for both List Boxes by way of removing the Doctors name. I see no reason to have that information applied to the Lists. The List Boxes are also set to be filled by DISTINCT values so as to ensure no duplicates will reside there.

Code of importance resides within the OnClick event for the Search button.

.
 

Attachments

Thank you very much for fixing the error. Appreciate your help!!

Your code is definitely much more elegant and concise. It will take me a longer time to digest the algorithm though. Even though I had some rudimentary C++/Java knowledge, I am pretty new to VBA.

The codes work flawlessly right now. I'll probably try to move back toward a query based design though, since I am hoping to have a function for exporting the result to an Excel file, and the possibility of checking a contact's project history record within that form.
 

Users who are viewing this thread

Back
Top Bottom