P
Peter Gonzales
Hi all,
I have a need to import information into my database from a variety of files
and formats. I want to set up a group of tables that will get populated from
the import file(s). Then from one form per table I will allow mapping the
information to what is already on file. Also I need to produce a report
showing the changes that will be made to the existing database. Then
actually import the information.
As a design decision I allow nulls on all the fields. Then I check if a
field is null or not. If null that means it was not available from the
import file and hence is unknown. Otherwise it is known and a zero-length
string or a 0 is actually the value coming from the import file.
As an example, on a Person to import I can POSSIBLY have first name, last
name, suffix, address line 1, address line 2, city, state, zipcode,
telephone 1, telephone 2 and email. Import file #1 has both address lines
available so if the address line 2 is blank I would force a zero-length
string into that record. But import file #2 only has one address line so I
would not load anything into address line 2 and expect it to be null.
My problem is that a field is showing up "Not null" in a query and "Null" on
a report. If I create a new query based on the table I populated from the
import files and for address line 2 have a column with Expr1:
Nz([AddressLine2],"Null") the fields with a zero-length show blank and the
nulls show "Null". Great... just what I expect. But if I create a new report
based on the table and place the same expression as the source for a textbox
=Nz([AddressLine2],"Null" I am getting "Null" on the zero-length strings.
Has anyone experienced this?
TIA
I have a need to import information into my database from a variety of files
and formats. I want to set up a group of tables that will get populated from
the import file(s). Then from one form per table I will allow mapping the
information to what is already on file. Also I need to produce a report
showing the changes that will be made to the existing database. Then
actually import the information.
As a design decision I allow nulls on all the fields. Then I check if a
field is null or not. If null that means it was not available from the
import file and hence is unknown. Otherwise it is known and a zero-length
string or a 0 is actually the value coming from the import file.
As an example, on a Person to import I can POSSIBLY have first name, last
name, suffix, address line 1, address line 2, city, state, zipcode,
telephone 1, telephone 2 and email. Import file #1 has both address lines
available so if the address line 2 is blank I would force a zero-length
string into that record. But import file #2 only has one address line so I
would not load anything into address line 2 and expect it to be null.
My problem is that a field is showing up "Not null" in a query and "Null" on
a report. If I create a new query based on the table I populated from the
import files and for address line 2 have a column with Expr1:
Nz([AddressLine2],"Null") the fields with a zero-length show blank and the
nulls show "Null". Great... just what I expect. But if I create a new report
based on the table and place the same expression as the source for a textbox
=Nz([AddressLine2],"Null" I am getting "Null" on the zero-length strings.
Has anyone experienced this?
TIA