Results 1 to 4 of 4
  1. #1
    Lowell is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2012
    Location
    Manitoba, Canada
    Posts
    54

    Null Error on Report Opening

    I have a report that opens with data drawn through a query, really simple, straight from a table. In the query one of the fields is this formula:



    MemberSymbol: IIf([MemberStatus]=1,'',IIf([MemberStatus]=2,"*",IIf([MemberStatus]=3," (ex)",0)))

    Earlier today it was this:

    MemberSymbol: IIf([MemberStatus]=1,Null,IIf([MemberStatus]=2,"*",IIf([MemberStatus]=3," (ex)",0)))

    I was getting this message:

    Invalid use of Null

    So I changed it to the top formula, but I still get the same warning.

    The query opens fine by itself and the WHERE statements generate correctly. It is only when I open the report that it throws the code. The macro that opens the report throws 'Error 2950'. I have the file location trusted. When I open the report straight from the list of reports on the left side it also throws the warning. So I know it's only when the report is opening.

    I can't find any other Null argument anywhere in connection with the report.

    Any thoughts on what to try?

    I have attached the Front End in the zip.
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Which query and report? Would be nice to have data to work with. Make a copy of db and import tables or provide the backend as well.
    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
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377
    Can you post the entire SQL of the recordsource? There may be a clue there.

  4. #4
    Lowell is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2012
    Location
    Manitoba, Canada
    Posts
    54
    I'm really sorry for wasting your time. I was a little leary of posting personal data, so i made some fake data so i could post the backend on this forum.

    Well, i tried the report before i posted it and it worked excellent, so then i was really confused and assumed it was the data.

    I copied the backend and frontend and started deleting data. Thankfully i was lucky enough to start at the right end. I found the record that was causing the issue. The table fields were all set to not required except the Primary Key, and yet when I added in the basic data, the report populated correctly. So we'll see if my client's program will fix that easily as well, fingers crossed...

    I will mark this solved, even though I don't really understand how the lack of data caused the issue.

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

Similar Threads

  1. Replies: 3
    Last Post: 05-10-2018, 07:48 AM
  2. Replies: 7
    Last Post: 11-07-2016, 09:24 AM
  3. Replies: 11
    Last Post: 06-24-2015, 01:36 PM
  4. type error if sub report has null vallue
    By tagteam in forum Access
    Replies: 5
    Last Post: 10-20-2013, 09:45 PM
  5. Replies: 0
    Last Post: 11-17-2006, 09:38 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