467,917 Members | 1,342 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,917 developers. It's quick & easy.

[help] Query with 1 or n parameter

a student know one ore more programming language

in a mask i select from a list_box one or more language and i send ad
parameter to a query that extract the student that know all this
language.

i use something like

table: Student,Language,Student- Language

query:
....
[Student- Language].Id_Lang
LikeNz([Forms]![Student-Query-param]![Lang_l_box],"*")

but if i select "ADA and C" the query report student that know :C or
ADA or C and ADA.

how i can do for got only the student that know "C *and* ADA"?.

grazie.

Oct 6 '06 #1
  • viewed: 1286
Share:
1 Reply
ray
Hi maurizio,

I think your query will be a bit more complex.

It will have to look something like:

Select StudentID from STUDENTS where
StudentID IN
(Select StudentID from STUDENT-LANGUAGE where LanguageID = "C")
AND
StudentID IN
(Select StudentID from STUDENT-LANGUAGE where LanguageID = "ADA")

Just add each new criteria as you iterate through the listbox.

Ray
ma****************@gmail.com wrote:
a student know one ore more programming language

in a mask i select from a list_box one or more language and i send ad
parameter to a query that extract the student that know all this
language.

i use something like

table: Student,Language,Student- Language

query:
...
[Student- Language].Id_Lang
LikeNz([Forms]![Student-Query-param]![Lang_l_box],"*")

but if i select "ADA and C" the query report student that know :C or
ADA or C and ADA.

how i can do for got only the student that know "C *and* ADA"?.

grazie.
Oct 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Dom Boyce | last post: by
2 posts views Thread by Christine | last post: by
5 posts views Thread by Steve Patrick | last post: by
2 posts views Thread by manmit.walia | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.