Re: Is Not Null



In addition to the excellent advice/information given, I would like to add
the following with respect to data input and the ZLS (Zero Length String)
and Null ...
------------------------------
When you enter "" (A ZLS)
- in a numeric field that IS NOT required, a Null will be stored.
- in a numeric field that IS required, you get an error.
- in a text field that allows ZLS's, a ZLS will be stored.
- in a text field that IS NOT required and DOES NOT allow ZLS's, a Null will
be stored.
- in a text field that IS required and DOES NOT allow ZLS's, you get an
error
- in an UNBOUND control, a Null is returned by the control

--
Brent Spaulding | datAdrenaline | Access MVP

"Mike P" <MikeP@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BDEC481B-3765-41B8-A3AA-670E1A0A2951@xxxxxxxxxxxxxxxx
I am running a query that should only produce records in which FieldX Is
Not
Null. However, records in which FieldX's look Null are showing up in the
query.

In my module which populates the table with FieldX, I have a variable that
is set to
strFieldX = ""
strFieldX may or may not get string data appended to it while processing.
At
the end of my processing loop, I have
Rec.FieldX = strFieldX

Is it possible that "" is equal to something other than Null? If so, any
ideas on how to make a blank strFieldX load the value of Null in
rcd.FieldX
when strFieldX = ""
Otherwise, I keep getting records that appear to be Null showing up with I
use the criteria of Is Not Null.

Thanks in advance for your help.



.



Relevant Pages

  • Re: A97 - what would you do 99 times out of a hundred?
    ... > text value sounds to me as no different as a zero length string. ... just makes it *possible* to store a ZLS in that field. ... non-unique indexes are not going to be speeded up by storing a ZLS ...
    (comp.databases.ms-access)
  • Re: Delete records
    ... Not all database engine allows a string with no character in it (a ZLS). ...
    (microsoft.public.access.queries)
  • Re: Problem with null parameter
    ... >> Just a stab at it here, but you're converting your DBNull.Value to a ... >> string before passing it in? ... try changing a single row's status to a ZLS ... >>> Regards ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Change the field content when printing
    ... "Marshall Barton" wrote: ... > replacement string needs to be a string with no characters. ... > This is known as a ZLS and, in VBA, is ...
    (microsoft.public.access.reports)