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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple fields and query question

Status
Not open for further replies.

jgarnick

Programmer
Feb 16, 2000
189
US
I have a table that has several different types of categories in a category field and many different types of subcategories in a subcategory field. I created a form with check boxes beside each type of category/subcategory for the user to select from. The user may check only one or may check many. I need to then use a query to pull together all the categories and subcategories the user has chosen. How do I create this query to pull only the selected categories/subcategories since there could be many!<br>
<br>
This table will be used to create mailing lists. The user needs to be able to choose the people to be on the list.<br>
<br>
Any ideas? Or better ways to go about it?<br>
<br>
Thanks--<br>
<br>
<p>jgarnick<br><a href=mailto:jgarnick@aol.com>jgarnick@aol.com</a><br><a href= > </a><br>
 
I believe listbox is a better way to handle this request than checkbox.<br>
<br>
It seems that all categories have the same set of subcatogories.<br>
<br>
You can use two private functions to get the list of categories and subcategories, such as strAllFunctions and strAllSubFunctions.<br>
<br>
Then in the query, the criteria will be <br>
<br>
&quot;where category in (&quot; & strAllFunctions & &quot;) and subcategory in (&quot; & &quot;strAllSubCategories & &quot;)&quot;<br>
<br>

 
No, not all subcategories are the same--<br>
<br>
How can you choose more than one line from a list box? The user needs to be able to select as many different categories and subcategories as are available--<br>
<br>
Example:<br>
<br>
Board<br>
&gt;&gt; Finance committee<br>
&gt;&gt; Exec committee<br>
Friend<br>
&gt;&gt;Donor<br>
&gt;&gt;Volunteer<br>
&gt;&gt;Arts council<br>
<br>
Any other ideas??<br>
<p>jgarnick<br><a href=mailto:jgarnick@aol.com>jgarnick@aol.com</a><br><a href= > </a><br>
 
jgarninck,<br>
Set the 'MultiSelect' Property, and you're in business...<br>
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top