Re: Not like
- From: "Charles via AccessMonster.com" <u35571@uwe>
- Date: Sun, 13 Apr 2008 13:46:23 GMT
The field is text and is used to store notations or employee status and
stored in a table then I want to print a report but not including a dozen or
so criterias such as "*Exc*"; "*Vac*", "*LOA*" "*Tra*" "*No Wo*" "*Comp*" Etc.
these are reason that an emloyees would not be scheduled to work their
regualar shift and I used a combo box in a form for the selection. Other
notations would include See GM, See Safety, Lic Expire on 5/5/08, Time off
denied, etc. and nothing or blank or null. and these flields would not be
excluded in the selection of the records. I used this before and I must have
done something that I'm not aware of for this not to give me the desired
results. In the same table there is another field that will list the shift
number and if not scheduled it will have the word Off and that criteria work
for that field to exclude the employee Off or not scheduled.
Thanks
Charles
Rick Brandt wrote:
It was a look up field and I delete it, renamed it and still the same
problem, when I enter a Not Like criteria it will not select that
record but it will only select other records with entries and not one
with nulls in the same field..
Two issues. If you eliminated the lookup field does your field now contain
the actual text words that you are testing for or does it contain numeric ID
values? Your criteria has to test for what is actually stored, not what was
previously displayed from the lookup.
When testing for inequality (<, >, <>, <=, >=, Not Like) you ALWAYS have to
include a separate test for Null values. Null values will not be excluded
automatically from any of those tests. In your case you would need
something like...
WHERE SomeField (Not Like "LOA" AND Is Not Null)
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200804/1
.
- Follow-Ups:
- Re: Not like
- From: quinto via AccessMonster.com
- Re: Not like
- References:
- Not like
- From: Charles via AccessMonster.com
- RE: Not like
- From: Duane Hookom
- RE: Not like
- From: quinto via AccessMonster.com
- Re: Not like
- From: Rick Brandt
- Not like
- Prev by Date: Re: Not like (CORRECTION)
- Next by Date: Re: Not like
- Previous by thread: Re: Not like (CORRECTION)
- Next by thread: Re: Not like
- Index(es):
Relevant Pages
|