MultiSearch Form, Combo Box not working (1 Viewer)

accessorater77

Registered User.
Local time
Today, 01:13
Joined
May 26, 2016
Messages
13
(I meant "Option Group" in the title, not "Combo Box.")

I've attached the database as a .zip file.

On the search form (FRM_SearchMulti) I've added an option group (Frame 36) to sort through my search results. The search works fine, but the search box options do not.

I know why it isn't working, but I don't know how to fix it. The Option Group has assigned values of 1, 2, and 3, to Male, Female, and N/A, respectively. So, when one clicks an option, it is searching through the table for a 1, 2 or 3 value, instead of the words Male, Female, or N/A.

Is there a way to add VB code to fix this? I don't want to also have to add a column to my table with the corresponding values of 1, 2, and 3.

Another thing that I know is wrong is how I added the 'Criteria' for the 'Gender' column in the query (QRY_SearchAll). I know how I wrote it out is wrong, but, again, do not know how to correct it.

Any help, or direction to help, would be greatly appreciated.

Thanks in advance!

(P.S. This search form is based off of the design of John Big Booty, and has been adjusted to work inside of a navigation form)
 

Attachments

  • DatabaseGOT.zip
    66.3 KB · Views: 194
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:13
Joined
May 7, 2009
Messages
19,230
here is the fix.
added an unbound textbox, txtGender.
on click event of your frame, set the value of txtGender (see change event of frame object).
modify your query to include txtGender and remove the frame.
 

Attachments

  • DatabaseGOT.zip
    73.2 KB · Views: 199

accessorater77

Registered User.
Local time
Today, 01:13
Joined
May 26, 2016
Messages
13
[SOLVED] MultiSearch Form, Combo Box not working

Thank you so much! Not only was that an awesome, and quick fix, but I actually understand what you did.

You, my friend, are a wizard!
 

accessorater77

Registered User.
Local time
Today, 01:13
Joined
May 26, 2016
Messages
13
@arnelgp

Sorry, but I've noticed one problem. After you choose an option, "Male, Female, or N/A," and then hit the clear button, it does not reset the search values in the "Search Results" list box.

It resets the list box if you type in the "SearchFor" text box, but not if any of the radio buttons are activated.

Do you have a solution to this?

Thanks, again.
 

accessorater77

Registered User.
Local time
Today, 01:13
Joined
May 26, 2016
Messages
13
Nevermind, I simply added

Code:
 Me.txtGender = ""
to the command button.

Thanks, again!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:13
Joined
May 7, 2009
Messages
19,230
oh, i did not look into that portion, any way you can investigate the click event of that "clear button" and just add one piece of code to the existing code there:

Me.txtGender.Value = ""
' your other code below
'

sorry slow motion.
 

Users who are viewing this thread

Top Bottom