Results 1 to 6 of 6
  1. #1
    Sana Firdaus is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2017
    Posts
    22

    What could be the cause of "Invalid use of null" while trying to update a field?

    What could be the cause of "Invalid use of null" while trying to update a field?

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    It's difficult to say without more info. Are you on a form? Using a formula? Using SQL? and if so what is being done?

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    Look at the field property in the table in design view. If the field is the key field it cannot be null - or - if any field has its property of "Required" set to Yes.

  4. #4
    Sana Firdaus is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2017
    Posts
    22
    yes the field property is neither set as primary key nor it has the field property of required data but still while updating this field from the data taken from a different table,it shows invalid use of null!!

  5. #5
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    If you are using VBA, you will get this error if you attempt to assign a Null to a variable that has not been declared as type Variant.

  6. #6
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    that error message applies to the record - and can be attributed to any field in the record - so you need to check all fields.... if still hard to find - be sure to test by putting in a test value into each field 1 by 1 until you isolate

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 11-13-2013, 08:56 AM
  2. Replies: 5
    Last Post: 06-26-2013, 02:29 PM
  3. Replies: 3
    Last Post: 12-20-2011, 08:41 AM
  4. StrComp causing "Invalid use of Null" error
    By sephiroth2906 in forum Programming
    Replies: 5
    Last Post: 09-15-2011, 07:06 PM
  5. Update query from form "invalid use of null"
    By Lady_Jane in forum Programming
    Replies: 4
    Last Post: 08-16-2011, 01:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums