G
Guest
I posted on 8/9 & again, want to thank Rick B. The information helped, but I
am still struggling to get teh syntax right. Through reading other posts I
have figured out a little SQL, but I'm obviously still lacking...this is the
query I have in place:
SELECT Data.Product, Data.Category, Data.Question, Data.[Q Effective Date],
Data.Answer, Data.[A Effective Date], Data.Owner, Data.Status
FROM Data
WHERE (((Data.Question) Like "*" & [Enter Keyword] & "*") AND
((Data.Status)="active")) OR (((Data.Question) Like "*" & [Enter 2nd Keyword]
& "*")) Is Null OR (((Data.Question) Like "*" & [Enter 3rd Keyword] & "*"))
Is Null OR (((Data.Question) Like "*" & [Enter 4th Keyword] & "*")) Is Null
OR (((Data.Question) Like "*" & [Enter 5th Keyword] & "*")) Is Null;
The problem I am having is that it is only searching on the first keyword
entered. If a user tries to search on more than one keyword, it pulls all
records in the Data table. I tried taking all but the last "Is Null" out,
but that didn't work either. What am I doing wrong???
Any help is greatly appreciated!
(As a side question, our network had server issues & now some of my queries
that were working are not now. I have checked the syntax & some of them did
appear to be different, however, after fixing it back to what I had they
still aren't working properly. Has anyone encountered such a problem...it
was giving me error messages stating Access encountered problems & had to
shut down)?
Thank you!
Lori
(e-mail address removed)
am still struggling to get teh syntax right. Through reading other posts I
have figured out a little SQL, but I'm obviously still lacking...this is the
query I have in place:
SELECT Data.Product, Data.Category, Data.Question, Data.[Q Effective Date],
Data.Answer, Data.[A Effective Date], Data.Owner, Data.Status
FROM Data
WHERE (((Data.Question) Like "*" & [Enter Keyword] & "*") AND
((Data.Status)="active")) OR (((Data.Question) Like "*" & [Enter 2nd Keyword]
& "*")) Is Null OR (((Data.Question) Like "*" & [Enter 3rd Keyword] & "*"))
Is Null OR (((Data.Question) Like "*" & [Enter 4th Keyword] & "*")) Is Null
OR (((Data.Question) Like "*" & [Enter 5th Keyword] & "*")) Is Null;
The problem I am having is that it is only searching on the first keyword
entered. If a user tries to search on more than one keyword, it pulls all
records in the Data table. I tried taking all but the last "Is Null" out,
but that didn't work either. What am I doing wrong???
Any help is greatly appreciated!
(As a side question, our network had server issues & now some of my queries
that were working are not now. I have checked the syntax & some of them did
appear to be different, however, after fixing it back to what I had they
still aren't working properly. Has anyone encountered such a problem...it
was giving me error messages stating Access encountered problems & had to
shut down)?
Thank you!
Lori
(e-mail address removed)