Hi all,
i found difficlties to build the right code to build criteria to an ADO filter based on several selecteditems from list boxes.
does anyone have an idea how it can be done?
the first is to loop the selected items and dynamically build a where clause, with each item representing a value. For example you would end up with
WHERE (field = '1' OR field = '2' or field = '3')
etc.
Second item is to have a table at the backend, and for each selected item, insert a value into this table along with the ID of the current user.
You then join to this table on the field with the values in equalling the values in another table, and also on the login ID being the login ID of the current user - which gives you multi user capability.
You have to be careful to erase the current users selections though whenever they run the screen.
An alternative of user ID is to use the spid of the connection, but you then have to be careful of the reuse of different spids by different connections.
Skip,
When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read... Tooth Company Freeze a Crowd! and Many are Cold, but Few are Frozen!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.