Results 1 to 4 of 4

Thread: Problems with readin a field in my Access database

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 1999
    Location
    Rijswijk, Holland
    Posts
    25

    Post

    Hello VB programmers,

    Reading out the next field in my database

    AcadInfoDYN(“TEST”)

    If a field is not filled in it will give the next error:

    Invalid use off null

    Before reading, how can I prevent this error?

    Nice greetings,

    Ingrid.

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Posts
    232

    Post

    You can use the IsNull() function to see if it's null or use construction !field & "".

    ------------------
    smalig
    smalig@hotmail.com
    smalig.tripod.com

  3. #3
    Addicted Member
    Join Date
    Oct 1999
    Location
    Oporto, Portugal
    Posts
    134

    Post

    When reading try this:

    If Not IsNull(AcadInfoDYN(“TEST”)) Then
    'put code here
    else
    var = ""
    End If

    ------------------
    Jorge Ledo
    j_ledo@hotmail.com
    Portugal

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    The easiest way is to do this:


    Text1.Text = "" & rs("MyField")


    Regards,

    ------------------

    Serge

    Software Developer
    Serge_Dymkov@vertexinc.com
    Access8484@aol.com



Posting Permissions

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



Click Here to Expand Forum to Full Width