Results 1 to 3 of 3
  1. #1
    Treeivery is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2016
    Posts
    10

    You tried to asiign the Null value to a variable that is not a Variant data type

    I am newbie to Access 2016 and have run across the error "You tried to assign the Null value that is not a Variant data type." This occurs whenever I'm attempting to add a new patient to my database using a form. However, when entering information directly into the patient table I don't get this message. I thought that using the table as my control source instead of the query would resolve the issue, but it hasn't. I can tab by the message and enter the information on the entire form. Doing so allows me to enter the data in the tables as needed, but I don't want my users to have to encounter this message. This is the only hick-up preventing me from rolling database out for regional use. Any assistance would be greatly appreciated. The link to the database is as follows. https://drive.google.com/file/d/1N_q...ew?usp=sharing

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    Main form and a subform are bound to same data source with Master/Child Links set to same field from same table, this is circular - the table is relating to itself. The [ir data] tab should not have a subform. Delete the subform container and save. Open form [INTERVIEW RECORD] and move all of its controls directly onto tab page (select all controls then copy/paste, make sure the tab page is selected before pasting). The controls will possibly drop in low on the tab, scroll down to find and then drag them up and resize the tab control and main form.

    Multiple similar name fields (CONDITION, CONDITION_2, CONDITION_3) indicates a non-normalized data structure. This might adequately serve your needs but then might cause you a lot of headaches later. What if a patient has more than 3 conditions? Searches and statistical analysis will be more difficult and might have to resort to UNION queries.

    Advise not to use spaces nor punctuation/special characters (underscore only exception) in naming convention.
    Last edited by June7; 12-31-2018 at 05:12 PM.
    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.

  3. #3
    Treeivery is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2016
    Posts
    10
    That did it! Many, many thanks!!!

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

Similar Threads

  1. Replies: 8
    Last Post: 08-17-2023, 02:33 AM
  2. Yes/No Data type and the Null value in queries.
    By JustAnElf in forum Queries
    Replies: 2
    Last Post: 11-19-2013, 09:34 PM
  3. Replies: 6
    Last Post: 11-16-2013, 06:06 PM
  4. data type variable constants
    By markjkubicki in forum Programming
    Replies: 2
    Last Post: 06-20-2012, 09:57 PM
  5. Replies: 2
    Last Post: 09-27-2010, 02:17 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