Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2009

    Unanswered: u tried to assign the null value to a variable that is not a variant data type error

    Hi Everyone,

    I am developing a small app in access 2003 to track ongoing projects and keep getting the following error: you tried to assign the null value to a variable that is not a variant data type

    This error comes up in twice in 2 different subforms off the main data entry form. In both instances the subforms are built based on 2 separate tables (a table tracking financial contributions made and a separate table keeping a journal entry). I built 2 separate forms for the $$ contributions and the journal and was able to successfully link them into the main data entry form as subforms. Both the subforms seem to work exactly as i had hoped however whenever i click into the date field (which are both set to a date/time data type in the table properties with a yyyy-mm-dd input mask in the sub form) i get the aforementioned error. If i click ok, i am still able to enter in the date of the journal entry/financial contribution but cannot determine why this error is appearing. Does anybody have any suggestions as to how and correct this problem? I don't get the error when i click into any of the other fields in the subforms.

    thanks in advance!

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Well, obviously the first step is to figure out what's different about your date fields vs everything else.

    The error you're receiving is a VBA error. It won't have anything to do with the underlying table. I'd be on the look out for some macros/events tied to that textbox. Access is telling you that some code is firing which is attempting to set a non-nullable variable to null.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Dec 2009
    Thanks Teddy, thanks for your help! I found the reason for the error.
    Last edited by ducky1977; 12-03-09 at 18:42. Reason: error issue resolved.

Posting Permissions

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