Results 1 to 4 of 4
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919

    Invalid use of null


    Option Compare Database
    Option Explicit
    Private Const TwipsPerInch = 1440
    Private Const ControlWidth = 3060 'The image control width 2.125" x TwipsPerInch
    Dim a() As String
    Dim CurYear As Variant

    Private Sub Form_Open(Cancel As Integer)

    CurYear = Year(DATE) <<<<<<<<<<<<< Why do I get "Invalid use of Null" on this statement? I do this elsewhere in the app without error.

    [snip]
    End Sub

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You don't have a field named Date, do you?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919
    Hi Paul,
    Yes. I'd totally forgotten the RecordSource for the form has a "Date" field returned by the query. I will easily resolve that.
    Thanks,
    Bill

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Invalid use of Null
    By justauser in forum Forms
    Replies: 2
    Last Post: 11-28-2012, 12:33 PM
  2. Error 94: Invalid Use of Null
    By athomas8251 in forum Forms
    Replies: 3
    Last Post: 11-09-2011, 11:46 AM
  3. CInt and Invalid Use of Null
    By drewetzel in forum Access
    Replies: 4
    Last Post: 10-21-2011, 03:52 PM
  4. Invalid use of Null
    By Wayne311 in forum Programming
    Replies: 4
    Last Post: 01-27-2011, 05:10 PM
  5. Invalid Use of Null!?!
    By Kipster1203 in forum Access
    Replies: 4
    Last Post: 05-13-2010, 06:09 AM

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