Query to show results is Null then show... (1 Viewer)

Number11

Member
Local time
Today, 13:35
Joined
Jan 29, 2020
Messages
607
Hi, so is it possible to have a query show a default wording when the results found are NULL. I just dont want to have black fields maybe "No Record Found"
 

jdraw

Super Moderator
Staff member
Local time
Today, 08:35
Joined
Jan 23, 2006
Messages
15,379
IF IsNull(someField) then
msgbox "No Record Found"
end if
 

Isaac

Lifelong Learner
Local time
Today, 05:35
Joined
Mar 14, 2017
Messages
8,777
Or inside the query:

ColumnAlias: nz([ColumnName],"No Record Found")
 

Number11

Member
Local time
Today, 13:35
Joined
Jan 29, 2020
Messages
607
Or inside the query:

ColumnAlias: nz([ColumnName],"No Record Found")
ok so this would work and show No Record Found if the results in that column were null, but if that had a result it will still allow the data say like "Ordered"
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:35
Joined
Feb 19, 2002
Messages
43,233
Keep in mind that doing something like this changes the data type of the column to a string so numbers and dates may not work the way they should.

"Empty" fields should ALWAYS be null so I would never substitute a string value. That just messes up other stuff.
 

Users who are viewing this thread

Top Bottom