Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

RE: Empy String vs. Null

Discussion in 'Information Technology' started by Arvin Meyer [MVP], Nov 15, 2005.

  1. Arvin Meyer [MVP]

    Arvin Meyer [MVP]
    Expand Collapse

    A NULL is an unknown; an empty string is unfilled:

    Null <> Null
    Null + 1 = Null

    "" = ""
    "" + "a" = "a"

    To cover both situations in code use the constant: vbNullString as in:

    If Len([MyControl] & vbNullString) > 0 Then

    Which means there's a value in it. If it equalled 0 then it would be either
    Null or empty.

    Arvin Meyer, MCP, MVP
    Microsoft Access
    Free Access downloads

    "Paul Hammond" wrote:

    > I should know and understand this, but I don't. Could somebody please
    > review the difference between these to values?
    > I have a column that either contains a code or it does not, but I have to
    > test for both null and "". I just can't understand the difference.
    > Please 'splain it to me.
    > TIA
    > Paul Hammond
    > --
  2. Loading...

    Similar Threads Forum Date
    India Akal Takht Chief Wants Obama to Take Stringent Measures to Check Hate Crimes against Sikhs Breaking News Sep 25, 2013
    Preserving Ancient String Instruments Gurmat Sangeet Feb 28, 2011
    Vibrating String Interfaith Dialogues Dec 14, 2007
    Sikh News String of welfare measures for Dalits in Punjab (Outlook India) Breaking News Oct 26, 2007

Share This Page