E
ellezeebub
Hi--I'm new to the group and pretty new to Access. I'm trying to get
a grip though, but this problem is making me crazy.
My problem, in a nutshell, is that I return a query in which all the
occurrences of a certain field containing RB or FB come back to me
(for rinse blank and field blank). But, I cannot write a query that
*excludes* those records.
Here is a SQL view of the query that works:
SELECT Station_location.STATIONNAME, Station_location.DATESAMPLED,
Station_location.Time, Station_samples.[Total metals],
TblTCUavg.AvgOfResult
FROM (Station_location INNER JOIN Station_samples ON
Station_location.STATIONCODE = Station_samples.STATIONCODE) INNER JOIN
TblTCUavg ON Station_samples.[Total metals] = TblTCUavg.SampleID
WHERE (((Station_location.STATIONNAME) Like "* rb*") AND
((TblTCUavg.ResultQualCode) Is Null)) OR
(((Station_location.STATIONNAME) Like "* fb*") AND
((TblTCUavg.ResultQualCode) Is Null))
ORDER BY Station_location.DATESAMPLED, Station_location.Time;
So, it would seem reasonable to me that all I would have to do to
exclude those values would be to insert a "not like" instead of a
"like" and all my problems would be solved.
SQL view of query that does not exclude rinse blanks and field blanks:
SELECT Station_location.STATIONNAME, Station_location.DATESAMPLED,
Station_location.Time, Station_samples.[Total metals],
TblTCUavg.AvgOfResult
FROM (Station_location INNER JOIN Station_samples ON
Station_location.STATIONCODE = Station_samples.STATIONCODE) INNER JOIN
TblTCUavg ON Station_samples.[Total metals] = TblTCUavg.SampleID
WHERE (((Station_location.STATIONNAME) Not Like "* rb*") AND
((TblTCUavg.ResultQualCode) Is Null)) OR
(((Station_location.STATIONNAME) Not Like "* fb*") AND
((TblTCUavg.ResultQualCode) Is Null))
ORDER BY Station_location.DATESAMPLED, Station_location.Time;
But, when I change the query I still get the rinse blanks and field
blanks in my results. Can anyone tell me how I'm messing this up?
Arrg.
Thanks.
a grip though, but this problem is making me crazy.
My problem, in a nutshell, is that I return a query in which all the
occurrences of a certain field containing RB or FB come back to me
(for rinse blank and field blank). But, I cannot write a query that
*excludes* those records.
Here is a SQL view of the query that works:
SELECT Station_location.STATIONNAME, Station_location.DATESAMPLED,
Station_location.Time, Station_samples.[Total metals],
TblTCUavg.AvgOfResult
FROM (Station_location INNER JOIN Station_samples ON
Station_location.STATIONCODE = Station_samples.STATIONCODE) INNER JOIN
TblTCUavg ON Station_samples.[Total metals] = TblTCUavg.SampleID
WHERE (((Station_location.STATIONNAME) Like "* rb*") AND
((TblTCUavg.ResultQualCode) Is Null)) OR
(((Station_location.STATIONNAME) Like "* fb*") AND
((TblTCUavg.ResultQualCode) Is Null))
ORDER BY Station_location.DATESAMPLED, Station_location.Time;
So, it would seem reasonable to me that all I would have to do to
exclude those values would be to insert a "not like" instead of a
"like" and all my problems would be solved.
SQL view of query that does not exclude rinse blanks and field blanks:
SELECT Station_location.STATIONNAME, Station_location.DATESAMPLED,
Station_location.Time, Station_samples.[Total metals],
TblTCUavg.AvgOfResult
FROM (Station_location INNER JOIN Station_samples ON
Station_location.STATIONCODE = Station_samples.STATIONCODE) INNER JOIN
TblTCUavg ON Station_samples.[Total metals] = TblTCUavg.SampleID
WHERE (((Station_location.STATIONNAME) Not Like "* rb*") AND
((TblTCUavg.ResultQualCode) Is Null)) OR
(((Station_location.STATIONNAME) Not Like "* fb*") AND
((TblTCUavg.ResultQualCode) Is Null))
ORDER BY Station_location.DATESAMPLED, Station_location.Time;
But, when I change the query I still get the rinse blanks and field
blanks in my results. Can anyone tell me how I'm messing this up?
Arrg.
Thanks.