Print Page | Close Window

CreateMultiSelectQuery.mdb (intermediate)

Printed From: Roger's Access Library
Category: Roger's Access Library
Forum Name: Roger's Download Samples
Forum Description: A compendium of Microsoft Access 97 and 2000+ routines, each separated into its own sample database.
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=369
Printed Date: 28 Mar 2024 at 4:41am
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: CreateMultiSelectQuery.mdb (intermediate)
Posted By: Roger Carlson
Subject: CreateMultiSelectQuery.mdb (intermediate)
Date Posted: 01 Aug 2008 at 6:40am

Please consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm - find out why here .

CreateMultiSelectQuery.mdb

This database illustrates how to create a query programmatically based on the selected values of a multi-select list box.

It creates a query which uses the IN clause to compare the field against a list. The routine loops through the list and builds the IN string from the values selected, creates the WHERE condition based on the IN string, and if "ALL" was not selected as one of the choices, appends the WHERE condition to the SELECT statement.
 
Download
Access 97 (24 KB):
http://www.rogersaccesslibrary.com/forum/uploads/5/CreateMultiSelectQuery97.zip - CreateMultiSelectQuery97.zip
Access 2000 DAO (35 KB): http://www.rogersaccesslibrary.com/forum/uploads/5/CreateMultiSelectQuery2k.zip - CreateMultiSelectQuery2k.zip



-------------
Consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm" rel="nofollow - find out why here .<



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net