MS Access: How to replace blank (null ) values with 0 for all records?
I guess it has to be done using SQL. I can use Find and Replace to replace 0 with blank, but n
I just had this same problem, and I ended up finding the simplest solution which works for my needs. In the table properties, I set the default value to 0 for the fields that I don't want to show nulls. Super easy.
without 'where's and 'if's ...
Update Table Set MyField = Nz(MyField,0)
UPDATE table SET column=0 WHERE column IS NULL
The following Query also works and you won't need an update query if that's what you'd prefer:
IIF(Column Is Null,0,Column)
Go to the query designer window, switch to SQL mode, and try this:
Update Table Set MyField = 0
Where MyField Is Null;
UPDATE YourTable SET MyField = 0 WHERE MyField IS NULL
works in most SQL dialects. I don't use Access, but that should get you started.