Results 1 to 2 of 2
  1. #1
    tndinnc is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    11

    validation on lostfocus ..you cannot assign a null to a variable that is not ..

    I have a form in datasheet view, it's source is a linked SQL table. I want to set validation so that when a users is on field that requires a number if they delete the 0 in it and tab out it forces them to enter a number. But all I ever get when anyone clears any field actually is "you cannot assign a null to a variable that is not a variant data type". All of my fiends are directly linked to a field in my linked table. So i'm not sure how to trap for that error. Any suggestions?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Don't understand that, never encountered that message. Field should allow Null. How are you doing the validation? Is there VBA code? Post code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Help with a Null Variable Issue
    By EDNYLaw in forum Access
    Replies: 6
    Last Post: 03-26-2013, 10:56 AM
  2. not null validation
    By kkukreja in forum Forms
    Replies: 7
    Last Post: 01-15-2011, 03:34 PM
  3. Control variable is Null
    By ngruson in forum Access
    Replies: 2
    Last Post: 04-21-2010, 10:27 AM
  4. Assign and call variable from table
    By smikkelsen in forum Access
    Replies: 7
    Last Post: 04-01-2010, 09:38 AM
  5. List box value to variable - invalid use of null?
    By Orabidoo in forum Programming
    Replies: 2
    Last Post: 05-07-2009, 11:06 AM

Tags for this Thread

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