Search>check box (1 Viewer)

rio

Registered User.
Local time
Today, 16:44
Joined
Jun 3, 2008
Messages
124
I have a Table like Table.jpg and then I make form like Form.jpg.
Can anyone help me how to make a search using check box. For example : If I check the soccer and badminton check box, it will show the name with that criteria in list box.

here I attach the image and database....
 

Attachments

  • form.jpg
    form.jpg
    32.9 KB · Views: 87
  • Table.jpg
    Table.jpg
    54.3 KB · Views: 71
  • db1.mdb
    228 KB · Views: 80

John Big Booty

AWF VIP
Local time
Today, 18:44
Joined
Aug 29, 2005
Messages
8,263
Have a look at the changes I've made to your query.

On a side note avoid using spaces and other special characters in your control and object names as these will cause you no end of grief in the future. You might also like to consider implementing a naming convention, to name your DB Objects. So you don't end up with a table a form a query and a report all with the same name. Something like FRM_FromName, TBL_TableName, QRY_QueryName, RPT_ReprotName, is good.
 

Attachments

  • db1.zip
    24.9 KB · Views: 84

rio

Registered User.
Local time
Today, 16:44
Joined
Jun 3, 2008
Messages
124
Have a look at the changes I've made to your query.

On a side note avoid using spaces and other special characters in your control and object names as these will cause you no end of grief in the future. You might also like to consider implementing a naming convention, to name your DB Objects. So you don't end up with a table a form a query and a report all with the same name. Something like FRM_FromName, TBL_TableName, QRY_QueryName, RPT_ReprotName, is good.

Thanks for ur help and advice.:D
 

rio

Registered User.
Local time
Today, 16:44
Joined
Jun 3, 2008
Messages
124
I'm make a little change to the db...
New question!! following my selection (check box), can i make it to list down the first name in the list box. no need to open FRM_SearchResult form.
Hopefully u understand my English.
 

Attachments

  • db1new.mdb
    356 KB · Views: 77

John Big Booty

AWF VIP
Local time
Today, 18:44
Joined
Aug 29, 2005
Messages
8,263
OK I think it's doing what you want now.

What I've done is to make the search query the control source for the List box. Then I've put some code in the On Click events of each of the check boxes to requery the list box when ever one of the boxes is clicked. You seemed to have missed part of the criteria in the query when you re-created it.
 

Attachments

  • db1new.zip
    44.7 KB · Views: 75

rio

Registered User.
Local time
Today, 16:44
Joined
Jun 3, 2008
Messages
124
OK I think it's doing what you want now.

What I've done is to make the search query the control source for the List box. Then I've put some code in the On Click events of each of the check boxes to requery the list box when ever one of the boxes is clicked. You seemed to have missed part of the criteria in the query when you re-created it.

OK.. now i understand how it's work. Thanks again 4 ur help.:)
 

Users who are viewing this thread

Top Bottom