Avatar of Derek Brown
Derek Brown
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Query filter

What is the difference between:
Like Left([Forms]![ProjectForm]![Details].[Form]![FireRating],4) & "*" and
Like nz(Left([Forms]![ProjectForm]![Details].[Form]![FireRating],4) & "*","*")

How would I get a different result
What I would like is:
Like [Forms]![ProjectForm]![Details].[Form]![FireRating]  or isnull.

What I'm trying to acheive is, filter records by the exact content of the form field unless the field is empty (Is null and "") in which case show all the records.
Microsoft Access

Avatar of undefined
Last Comment
Derek Brown

8/22/2022 - Mon
als315

You always can add separate field to your query equal to

Isnull([Forms]![ProjectForm]![Details].[Form]![FireRating])

with OR criteria True

to your main criteria

Jim Dettman (EE MVE)

You would want:


[Forms]![ProjectForm]![Details].[Form]![FireRating] Is Null or  Left([Forms]![ProjectForm]![Details].[Form]![FireRating],4) & "*"


Jim.

Derek Brown

ASKER
Hi Jim

I'm using access 2002 but that does not work for me I have to use

On this occasion I don't need the Left and ,4)

So finally this works.  Like nz(([Forms]![ProjectForm]![Details]![FR]),"*")

I can't quite understand why I can't use Like [Forms]![ProjectForm]![Details]![FR]) Or IsNull

Hi Als315 could not get that to work either
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
SOLUTION
als315

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Jim Dettman (EE MVE)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Derek Brown

ASKER
Thanks Both
Derek Brown

ASKER
Thanks Als315 Git I can see what I was doing wrong.

Thanks Jim Got it