×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Multiselector form

Multiselector form

Multiselector form

(OP)

I'm trying to build a selector form to pull out data from a table where each record can have just one of a number of tick boxes selected, then picking records containing combinations of ticks. The form would look like this, and allow the combinations of ticks to be set up at the top then showing the matching records in the subform. So for example all those with STO OR CGG ticked.



I can do a similar AND version where there can be more than one tick per row, and to extract records that match the chosen combinations. So ones with ticks in column 1 and 3, for example.

But I run into errors like 'too complicated' when trying to adapt it to the OR condition I now need.

RE: Multiselector form

What does your table look like?

"a table where each record can have just one of a number of tick boxes selected" - please don't tell me you have:

FirstName  STP  CTP  SGG  CGG
Nikki        0    0    0    1
Tony         1    0    0    0
Claire       0    0    1    0
 


---- Andy

There is a great need for a sarcasm font.

RE: Multiselector form

(OP)
Don't understand but I think you may mean that the table should have a single combo with four options, not tick boxes?

I started this way but the client wanted separate tick boxes.

RE: Multiselector form

I would use an option group bound to one field.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: Multiselector form

(OP)

Thanks for views, which gave useful pointers.

I've reverted to using a combo, not separate tickboxes. What I included earlier was a mock-up but the real table is called HData and the combo is Circumstance, which has 5 options. The selections are made in a frmMultiSelect which contains these options as tickboxes, to allow easy picking.

This then does the selection and works a treat.

CODE -->

SELECT DISTINCT *
FROM HData
WHERE (HData.Circumstance="Homecare" And Forms!frmMultiSelect!chkHomecare=True) 
Or (HData.Circumstance="Released" And Forms!frmMultiSelect!chkReleased=True) 
Or (HData.Circumstance="Secure" And Forms!frmMultiSelect!chkSecure=True) 
Or (HData.Circumstance="Hospital" And Forms!frmMultiSelect!chkHospital=True) 
Or (HData.Circumstance="Other" And Forms!frmMultiSelect!chkOther=True); 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close