|
-
Jun 4th, 2002, 08:50 PM
#1
Thread Starter
Hyperactive Member
Select statement nightmare
Hell, Im trying to select some thing from a table, but i cant quite get it.
this is what happens: the user enters a string of codes like this "a,b,c" for example of records they want to get from the database.
so if there was this database:
a 0 1
b 2 5
c 3 4
d 1 7
e 0 0 (3 fields)
I would want the recordset to get the first three because they have the a b and c.
how can you do this?
this is what i have so far if that's any help, it returns the error "No value given for one of more required parameters":
rstResins.Open "SELECT Distinct Code, O2, CO2 FROM Resin WHERE (InStr(1, " & Chr(34) & strresins & Chr(34) & ", Code, vbTextCompare) > 0)"
strresins would be the "a,b,c" and code the database fieldwith the a b c d e in it.
I also was asking the same type of thing earlier:
http://www.vbforums.com/showthread.p...hreadid=175536
Thanks for your time 
Ang
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|