replace blank with AA

Bunce

New member
Local time
Today, 01:13
Joined
Jun 19, 2009
Messages
4
I want to replace a blank field in a table with letters AA. If the table has something in the name field, then return that field, if blank, then return AA. I've only written queries in design view. So I've tried something like IIF([tbl1]![name]="","AA",[tbl1]![name]). I guess Access doesn't recognize "" as blank. Any ideas?
 
You are on the right track. Try IIf([tbl1]![name] Is NULL,"AA",[tbl1]![name]).
 
"" is an EMPTY String, not blank.

IsNull would be what you would test for but I would capture both an empty string and null by using:

IIF(Len([tbl1]![name] & "") = 0,"AA",[tbl1]![name])
 

Users who are viewing this thread

Back
Top Bottom