Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check Box Query Help

Status
Not open for further replies.

Igawa29

MIS
Jan 28, 2010
99
US
Thanks in advance I always enjoy posting here and expanding my Access knowledge. Anyway I have 39 check boxes and what I want is when I run my query is to have the query check the values that are checked true and run those through my query. I have a button trigger on my FORM to run the query, however I am not sure the code syntex that I will need to accomplish this. Any help will be appreciated.

Thanks

PS (I did figure out how to do a select all and select none button)
 

"I did figure out how to do a select all and select none button"

So, how (code?) did you do that?

The code may be copied and adjusted to do what you want....

Have fun.

---- Andy
 
Well these buttons just select all or select none.. no value storage.

Code:
Private Sub SelectAll_Click()
Behav.Value = True
Behav.Value = True
Bio.Value = True
Cat.Value = True
Clin.Value = True
ClinPgm.Value = True
ConC.Value = True
Demo.Value = True
Dis.Value = True
Discon.Value = True
Dise.Value = True
EAP.Value = True
ETG.Value = True
Excel.Value = True
Finl.Value = True
Gaps.Value = True
HA.Value = True
Hss.Value = True
ICD9.Value = True
Inpat.Value = True
LMP.Value = True
LTDiss.Value = True
Med.Value = True
NADB.Value = True
OV.Value = True
OC.Value = True
OH.Value = True
OU.Value = True
OutPat.Value = True
PDFIN.Value = True
RX.Value = True
RXR.Value = True
Prev.Value = True
Proff.Value = True
STD.Value = True
Sum.Value = True
TC.Value = True
Ung.Value = True
End Sub
Private Sub Reset_Click()
Behav.Value = False
Behav.Value = False
Bio.Value = False
Cat.Value = False
Clin.Value = False
ClinPgm.Value = False
ConC.Value = False
Demo.Value = False
Dis.Value = False
Discon.Value = False
Dise.Value = False
EAP.Value = False
ETG.Value = False
Excel.Value = False
Finl.Value = False
Gaps.Value = False
HA.Value = False
Hss.Value = False
ICD9.Value = False
Inpat.Value = False
LMP.Value = False
LTDiss.Value = False
Med.Value = False
NADB.Value = False
OV.Value = False
OC.Value = False
OH.Value = False
OU.Value = False
OutPat.Value = False
PDFIN.Value = False
RX.Value = False
RXR.Value = False
Prev.Value = False
Proff.Value = False
STD.Value = False
Sum.Value = False
TC.Value = False
Ung.Value = False
End Sub

I was thinking of adding a list box and when I hit the run button for the list box to capture all the check box values then pass that off to the query using that code:

Code:
 [FORMS]![FORM1].Listbox1

But then again I am not sure the entire syntax on it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top