+ Reply to Thread
Results 1 to 3 of 3

invalid use of null

  1. #1
    Registered User
    Join Date
    01-30-2006
    Posts
    7

    invalid use of null

    i am trying to get data out of a databse using vba and i am getting a runtime error '94' - invlaid use of null.

    i am trying to access the value in the database in the contact column using the below code

    Please Login or Register  to view this content.
    and it is this line that is causing the problems. There is no value stored in the database for this field when returned for the specific row and unfortunately the nature of the project is such that i cannot always guarantee an entry in that field. how can i extract the value for the contract field (even when it is empty) so that i dont get this runtime error?

    any help much appreciated.

    mxp

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    I am no expert at extrating info from a database.

    Perhaps test for null 1st

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Thumbs down

    You can try to filter with isnull instruction:

    Please Login or Register  to view this content.
    Regards,
    Antonio

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1