Your expression should work. Why do you think it doesn't work? You could also use:
Left([SomeField],3) <>"CTR"
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
It doesn't work because it still select those values start with "CTR". The Left function doesn't work either. Something wrong with my query. Thanks for your help.
Something is different with your application. Are the tables linked from outside Access? Is the field a lookup field in your table?
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
You might be doing something unconventional. I don't know.
Linked Excel files might not always behave as if they were Access tables.
I repeat, "Is the field a lookup field in your table?"
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
Is the field from an Access table or the Excel file? What is your complete SQL view of your query?
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
There is no "where" clause in your query. I would expect it to return all records from the query.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
Is it possible that you have some records with a space character and then CTR, so the filter lets it pass, but when viewing, you are not noticing the space and it appears to begin with CTR?
Good point George.
Also, do some trouble-shooting:
- can you filter anything on any field
- does this work
Left(UCase(Cust.Type),3) <> 'CTR'
- what do you notice if you sort on the type field
- what do you see if you copy the records and paste into notepad
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
The Trim function didn't either.
Yes, I can filter on other field. It works when I use Cust.Type LIKE 'CTR*'
UCase didn't work either.
I can sort this field just fine.
When I copied the records to notepad, I saw the values just like what I saw in Access.
And yes, records starts with CTR also from Cal 2004.
Thank you all. At this pint, I decided to get it done by different approach. Thank dhookom so much to keep up with me.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.