Re: Not like

Tech-Archive recommends: Fix windows errors by optimizing your registry



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

.



Relevant Pages

  • Re: Mutli value field? - Memo field?
    ... the perfromance of an employee against set criteria. ... 20 criteria to be measured by the person monitoring the employee's ... I guess I need a memo field for MeasuresFailed, ...
    (microsoft.public.access.forms)
  • Re: Report parameters
    ... It looks to me like you should add some option boxes on to you criteria ... selection form with the options All, Range, Single. ... I have a button called cmdfilter, two option boxes - 1 called optDateRange ... > PK from the Employee table); ...
    (microsoft.public.access.reports)
  • Re: beep beep
    ... Blunt and Opaque wrote: ... dartboard - you still get points if you get close, ... (Speaking both as an employee and as an employer.) ... detail about precisely what criteria have to be met. ...
    (soc.singles.moderated)
  • Re: Query expression Help
    ... I neglected to note that you were putting a Criteria on ... Don't you just want to show the sum of employee time for each ... <MS ACCESS MVP> ... Criteria: "Bill Black" ...
    (microsoft.public.access.gettingstarted)
  • Re: rotating table records in a form
    ... Be aware that Access does NOT put records-in-a-table in any sort of order ... You want to assign an employee to a project (that doesn't already have ... and you may even wish to exclude them from the count of the number ... Jeff Boyce ...
    (microsoft.public.access.modulesdaovba)