Help with Allen Browne's Multi Select List Box

proballin

Registered User.
Local time
Today, 13:21
Joined
Feb 18, 2008
Messages
105
Ok, I've been able to successfully implement Allen Browne's Multi Select List Box in a form I have. However I have two more list box that I need on this same form with the same features as the first. How do I edit his code to add in additional list boxes without totally messing it up. Here is the link to what I am talking about.

http://allenbrowne.com/ser-50.html
 
Last edited:
Seems a simple case of copy and paste but you have to show us what you allready have in order to give you a clear answer.
 
Ok...I've got the copy and paste part but I still get errors. After debugging I realize that my Where statement isn't being read right though the right variables are in it. This is one of the last statements I run.

DoCmd.OpenReport strDoc, acViewPreview, WhereCondition:=strWhere, OpenArgs:=strDescrip

strWhere is a combination of strWherePlant and StrWhereMaterial. I tried to combine it like so:

strWhere = strWhereMaterial & " AND " & strWherePlant

When I do select a material and a plant I just getr #Error on my form. However if I only select one I get an error message that says:

Error 3075 - Syntax Error (missing operator) in query expression...

How do I get the where condition from each list box to work together when filtering?
 
You are combining postitional and named parameters perhaps you should stick with one:
Code:
docmd.Openreport strDoc,acViewPreview,,strWhere,,strDescrip
Another way to get your Where clause in the query is to change the query to which your report is connected by saving it including the required where clause.

HTH:D
 
Last edited:

Users who are viewing this thread

Back
Top Bottom