Solved Query Not Giving Expected Result (1 Viewer)

danbl

Registered User.
Local time
Today, 10:01
Joined
Mar 27, 2006
Messages
262
I have a table with DrId, Name, Name Details. DrId is an auto number field, the other two are short text fields.
A basic query is built off of this table.
In the condition section of name field is a statement Not Like "z*". Names of those who have left were prefixed (z-name). This produced the correct result for the drop down on a data entry form.
When I remove the Not Like "z*" statement all those in the table appear.
When I place a condition such as Not Like "R" in name details field, the list does not populate with any names. The (R) is for those who have retired or resigned their position.

I am confused as to why this happening??? Suggestions??????
:unsure:
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:31
Joined
Oct 29, 2018
Messages
21,467
Hi. Did you forget to use/add the asterisk (*) wildcard?
 

danbl

Registered User.
Local time
Today, 10:01
Joined
Mar 27, 2006
Messages
262
I did try both ways ………… my error seems to be I forgot I could exclude those who left or retired by excluding their DrId! (<>(their number)) in the condition.

MY BAD :mad::mad:
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:31
Joined
Oct 29, 2018
Messages
21,467
I did try both ways ………… my error seems to be I forgot I could exclude those who left or retired by excluding their DrId! (<>(their number)) in the condition.

MY BAD :mad::mad:
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom