[AccessD] Query based on multiselect listbox

Huffman, Jarad B. jbhuffman at mdh.org
Thu Jun 5 08:08:38 CDT 2003


I actually use a temp table to store the selected values and the textbox to
display the selected values.  Then I use the temp table in the query.  If
the record isn't in the temp table, the related records aren't selected.  I
believe I got this from the Developer's Handbook (both 97 and 2002).

HTH,
Jarad Huffman

-----Original Message-----
From: Tim Thiessen [mailto:tim at irwin-greenhouses.com] 
Sent: Wednesday, June 04, 2003 4:21 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Query based on multiselect listbox


Dear Group

I am trying to use a multselect listbox to serve as a the parameter for a
query.  I'm using the IN operator but it doesn't seem to be working.  I'm
using A97.  Here is the SQL

SELECT Invoice.RDC
FROM Invoice
WHERE (((Invoice.RDC) In ([Forms]![frmWrkShts]![RDCCriteria]))
AND ((Invoice.[Invoice Date])<=[Forms]![frmWrkShts]![date]));

In the frmWrkShts, I have a text box (RDCCriteria) that is storing the items
selected from the listbox.  That part is working fine.  However, when I run
the query, 0 records are returned.  If I run the query with the items from
the text box, I get the correct number of records.  Is it not possible to
use the IN operator with a parameter query?

Tim Thiessen

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list