Displaying Check Box Information

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Wasn't sure what to title this question. It involves queries and forms.

I have a form, frmrecords, that displays project information, for each
project, multiple work types are available. The work types are represented
by separate check boxes.

OK...

I have another form, frmsearch, that I want to be able to choose a work type
and list all the project that contain that work type. I am having trouble
figuring out how to create a query that would provide the specific check box
info, based on the specific work type.

Hope my description is not as confusing as it seems.

Thanks in advance.
 
You might do better to create a lookup table (just a regular table
that you will use to hold all of the Work Types) Create a combobox on
your form so that the user can pick the one work type for the current
record.

That way, when you create your query you will be able to search and/or
sort on the WorkType field.

HTH
 
This is how I had it working previously. But the problem is that the
projects will have multiple work types involved. So I had to nix that idea,
and went to the multiple check boxes.

Thanks for the input though.
 
Then your table structure IS WRONG.

If you have a separate yes/no field for each Worktype, then you're
storing data in fieldnames. If the number of worktypes ever changes,
or if the identity of one of your fields changes, then you must change
your table structure, all your queries, all your forms, all your
reports to reflect the changed table structure. Ouch!

If you have a Many(projects) to Many(worktypes) relationship, it's
well worth the effort to model the data as a many to many
relationship, using a subform to allow selection of as many worktypes
as are needed.

John W. Vinson[MVP]
 
Back
Top