Access query

M

mutlu

I wanna prepare a make-table query. I have a field name with "number of
students". there are values like 0,1,2,3..etc. in it. What I want to do is
that when directly press enter all of the data will come into my screen. in
addition to that when enter 1 and then press enter, data with 1 student will
come. I managed this with like "*" & [number of stu] & "*". now I want to add
a new property. when user writes "YES" into table all of the data which is
greater than 0 will come or if s/he enters "NO" into the table data which is
=0 will come. I think I should have to use IFF function but how can I do that?
 
V

Vincent Johns

mutlu said:
I wanna prepare a make-table query. I have a field name with "number of
students". there are values like 0,1,2,3..etc. in it. What I want to do is
that when directly press enter all of the data will come into my screen. in
addition to that when enter 1 and then press enter, data with 1 student will
come. I managed this with like "*" & [number of stu] & "*". now I want to add
a new property. when user writes "YES" into table all of the data which is
greater than 0 will come or if s/he enters "NO" into the table data which is
=0 will come. I think I should have to use IFF function but how can I do that?

You might try

...
HAVING (
IIf([number of stu]="YES",
([number of students])>0,
([number of students])=0)
);

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here
 
Top