×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Test nulls in query
2

Test nulls in query

Test nulls in query

(OP)
Hello I have run across an old problem - that of nulls and empty fields.

I want to return a yes no rersult in a query so I can quickly check if sort-codes are missing in my table.

I have entered: TEST RESULT: IsNull([Sort Code])

Thus gives the same result whether or not a value exists.

Can someone give the the correct expression to use within a query.

I have tried aslo using iff and switch functions but not getting there.

I guess ideally I would like to be able to display the words "Correct" when an entry exists and "Error" when the field is blank.

Many thanks Mark

RE: Test nulls in query

If I understand, you want a query column to display when a field is either null or blank.

CODE --> Query

Test Result: IIf(Len([Sort Code]&"")= 0, "Correct","Blank") 

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: Test nulls in query

I believe is the other way around:

CODE

Test Result: IIf(Len([Sort Code] & "" ) = 0, "Blank or Null", "Has Value") 


---- Andy

There is a great need for a sarcasm font.

RE: Test nulls in query

@Andy, good catch. I'm falling victim to multi-tasking and advancing age bomb

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: Test nulls in query

(OP)
As always, thank you very much and a very happy new year you both.

Regards Mark.

RE: Test nulls in query

Don't you think Duane deserves a * ? ponder


---- Andy

There is a great need for a sarcasm font.

RE: Test nulls in query

@Mark Happy New Year to you also.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close