FaithSpins
New member
- Local time
- Today, 13:14
- Joined
- Dec 16, 2010
- Messages
- 5
Hi there!
Me again...
I decided to work from scratch in an effort to learn this properly. Well, my efforts are futile!
What I am hoping to do is create a form with checkboxes that run a query based on the checkboxes ticked. More than one checkbox might be ticked. The query "should" spit out the company names that jive with the boxes checked.
What I have:
A table named Contacts. In there has all of the contact information (company, address, etc and so on) along with (5) check boxes that the end user checks if applicable. There are some records with just one checked box or some with several checked boxes.
anyway...
I have an unbound form named frmPortStat with checkboxes (cb1, cb2, cb3, cb4, cb5). They are "labled" the same as those checkboxes in the Contacts' table. This is where the end user would tick the boxes and then click a command button to run a query and produce those results in its subform.(Port_Stat_Results).
I have a query named qryPortStat. In this query sits [Company] and those five checkboxesfrom the Contacts Table. The query's criteria for all five checkbox controls are set to True (without quotes).
Next I placed a command button that would be used to run the query based on the boxes checked & behind it I placed the following code:
Option Compare Database
Private Sub Command13_Click()
Me.Port_Stat_Results.Requery
End Sub
I then view the form to test it but...parameter boxes in the name of each check box keeps coming up like annoying flies you can't reach with a swatter! And of course there are no results.
What am I missing?
I would great appreciate input.
thank you very very much!
Me again...
I decided to work from scratch in an effort to learn this properly. Well, my efforts are futile!
What I am hoping to do is create a form with checkboxes that run a query based on the checkboxes ticked. More than one checkbox might be ticked. The query "should" spit out the company names that jive with the boxes checked.
What I have:
A table named Contacts. In there has all of the contact information (company, address, etc and so on) along with (5) check boxes that the end user checks if applicable. There are some records with just one checked box or some with several checked boxes.
anyway...
I have an unbound form named frmPortStat with checkboxes (cb1, cb2, cb3, cb4, cb5). They are "labled" the same as those checkboxes in the Contacts' table. This is where the end user would tick the boxes and then click a command button to run a query and produce those results in its subform.(Port_Stat_Results).
I have a query named qryPortStat. In this query sits [Company] and those five checkboxesfrom the Contacts Table. The query's criteria for all five checkbox controls are set to True (without quotes).
Next I placed a command button that would be used to run the query based on the boxes checked & behind it I placed the following code:
Option Compare Database
Private Sub Command13_Click()
Me.Port_Stat_Results.Requery
End Sub
I then view the form to test it but...parameter boxes in the name of each check box keeps coming up like annoying flies you can't reach with a swatter! And of course there are no results.
What am I missing?
I would great appreciate input.
thank you very very much!