Bill Murphy said:
I have a table that contains columns with data types text, currency,
number and date. Some fields in this table contain null values, and
this is creating problems when I export to ascii, Excel or other
formats. Is there a way to eliminate all null values in all rows and
columns in the table programatically?
Only if you have some idea what you want to put in each, and only if it
makes sense to change a Null value in a field (which implies data not
available or not applicable) to something else. Most often, in my
experience, it does *not* make sense to do that. "Null" is a very
useful concept.
If the Null fields can really be replaced by some other value without
losing meaning, then you can use one or more update queries to do it.
You might use the Nz() function in the query/queries to replace Null
values with 0 or "", or some other value, as appropriate on a field by
field basis.
However, if it's just a matter of getting the export to work, I'd
recommend instead that you leave the table alone, but create a SELECT
query that selects all the fields from the table, and wraps each in the
Nz() function, as I described above. Then export that query instead of
the table. Voilà, no Nulls in the output.