Hi Dian,
 
> Thanks...I did get it working. What I do is toss all selected IDs
out into
> an array from the list box after the user clicks OK. Then I build
the SQL
> statement from the array that slips the IDs into a continual
string of OR
> statements.

Yuck. Use IN:

"SELECT * FROM Referrals WHERE Referrals.CustomerID=1 " _
        & "AND Referral.Product='Checking '" _
        & "AND Referrals.TellerID IN ('T66','T54','T22')"

This way you don't have to do any fancy OR'ing of your input. You
should, however, segregate your parameters so each one is explicitly
parsed:

"SELECT * FROM Referrals " _
        & " WHERE (" _
        & "(Referrals.CustomerID=1)" _
        & " AND (Referral.Product='Checking')" _
        & " AND (Referrals.TellerID IN ('T66','T54','T22')" _
        & ")"

I broke it into several lines so you could see the para coupling.

Regards,

Shawn K. Hall
http://ReliableAnswers.com/

'// ========================================================
    Love truth, and pardon error.
        -- Voltaire




------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to