View Full Version : Check Box Multiple Categories


Neo90815
09-11-2000, 12:18 PM
Anyone have any suggestions on creating check boxes on a form for Multiple Categories?

Everywhere I read seem to suggest to use check boxes for yes/no. We need it to store values. For example, Joe Smith likes Apples, Oranges, etc. Users can check all categories or just one.

In my book and prevous posts suggested to run queries on the values associated in the checkbox and return results based on those value. How?

Any suggestions is greatly greatly appreciated.

Neo

Travis
09-12-2000, 10:22 AM
Check Boxes are Yes/No controls. In your case that is what you are doing, saying yes or no to likes. Thus allowing you to get the opposite their dislikes. By not adding the check boxes to an Option group you will be able to select as many or as few as you like.

For this Yes is = 'Like' and No is = 'Dislike'. In order to find all people who 'Like' Oranges would be as simple as Quering on the Oranges field for the True value (-1).

Neo90815
09-12-2000, 10:46 AM
Thanks Travis,

I don't understand. Can you elaborate?

I'm trying to create a software inventory database. For each user check all or some applications. Joe Smith has MS Word, Excel, IE, etc.

Check Box for Word
Check Box for Excel
Etc.

Once check one or all, need it to record the value of the checkbox on to a field called [Software]. This field can list all the software that were checked separated by a comma.

I have tried
***************************
Private Sub Check32_Click()
If Check32.Value = True Then
Software.Value = "MS Word"
Else
Software.Value = False
End If
End Sub
*********************************
It works when checked and unchecked. But need it to store multiple selection checks.

Thanks!

Pat Hartman
09-12-2000, 11:04 AM
You should NOT under any conditions store multiple values in a single field. You have a 1-to-many relationship. To properly implement it you will need an additional table. You can use a subform to display and maintain the selections.