P
Peter Gonzales
Hi all,
I created a new empty database. Then created a new table with Field1 (Text,
Required=No,Allow Zero Length=Yes) and Field2
(Numeric,Required=No,Default=No value here). Switched to datasheet, tabbed
to Field2 and entered a 2. Next record entered a blank in Field1 and nothing
in Field2. Backedup to Field1 and clear it.
Created a query with 2 columns where I use Nz to see if the field is null or
not. Query shows:
Record 1 Null, 2
Record 2 Null, Null
Created a report with both fields having as part of control source Nz to see
if the field is null or not. Report shows:
Record 1 Null, 2
Record 2 Null, Null
Created a form on table. On the afterupdate for Field1 I used If
IsNull(Field1) Then Field1 = "" to force a ZLS. Opened form and on record
one entered a blank in Field1 then cleared and moved to record 2. Exit form.
Reran query and it shows (where * is nothing, blank, ZLS whatever you want
to call it):
Record 1 *, 2
Record 2 Null, Null
Great - just what I expect and WANT.
Reran report and it shows:
Record 1 Null, 2
Record 2 Null, Null
Why does the query show record1/field1 to be blank (see * above) but the
report shows null?
Peter
I created a new empty database. Then created a new table with Field1 (Text,
Required=No,Allow Zero Length=Yes) and Field2
(Numeric,Required=No,Default=No value here). Switched to datasheet, tabbed
to Field2 and entered a 2. Next record entered a blank in Field1 and nothing
in Field2. Backedup to Field1 and clear it.
Created a query with 2 columns where I use Nz to see if the field is null or
not. Query shows:
Record 1 Null, 2
Record 2 Null, Null
Created a report with both fields having as part of control source Nz to see
if the field is null or not. Report shows:
Record 1 Null, 2
Record 2 Null, Null
Created a form on table. On the afterupdate for Field1 I used If
IsNull(Field1) Then Field1 = "" to force a ZLS. Opened form and on record
one entered a blank in Field1 then cleared and moved to record 2. Exit form.
Reran query and it shows (where * is nothing, blank, ZLS whatever you want
to call it):
Record 1 *, 2
Record 2 Null, Null
Great - just what I expect and WANT.
Reran report and it shows:
Record 1 Null, 2
Record 2 Null, Null
Why does the query show record1/field1 to be blank (see * above) but the
report shows null?
Peter