Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2005
    Posts
    313

    Unanswered: How can I set the Null value

    Hi
    in MS Access:

    In VBA:

    I want to set like this:

    dim cc1 as string


    cc1 = Null

    It doesn't work, how can I make the initial value to be Null value.

    Thanks.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    try:
    cc1=""

  3. #3
    Join Date
    Dec 2003
    Posts
    268

    Problem

    You cant set a string as a null only objects and variants can be set to null

    dim cc1 as variant

    when it is initially declared it is set to null

  4. #4
    Join Date
    Sep 2005
    Posts
    313
    I have a question,

    Variant can be string, integer, character, date, etc. Right!

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    a variant IS all of those things. A variant can STORE a string, integer etc... however it is STILL a variant. it never "becomes" a different data type.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  6. #6
    Join Date
    Nov 2002
    Posts
    272
    Quote Originally Posted by healdem
    try:
    cc1=""
    Better yet:
    cc1 = vbNullString

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •