Results 1 to 11 of 11
  1. #1
    scott0_1 is offline Advanced Beginner
    Windows Vista Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    82

    Report won't save and close after editing

    Hi all,



    This is the first time this has happened... I just edited a report (the SQL specifically) and when I try to close it, a dialog box opens asking if I'd like to save it. If I click yes, nothing happens. I've tried saving it (ctrl-s) before closing, but it doesn't seem to save. I know this because when the dialog box opens again (even though I saved), I click 'no', it closes, but my edits are not saved.

    I thought it might be because of an error in my SQL, but when I view the report, it opens fine with the correct data.

    Any thoughts?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    No idea without reviewing db and report design.
    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
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    You never get or see any notification that you have opened the db as read only? You can edit the design of a query (or any other object for that matter) as a test and the modification is not saved either?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    scott0_1 is offline Advanced Beginner
    Windows Vista Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    82
    Quote Originally Posted by Micron View Post
    You never get or see any notification that you have opened the db as read only? You can edit the design of a query (or any other object for that matter) as a test and the modification is not saved either?
    Definitely not read-only. I checked the attributes just incase. I can make other modifications to other parts of the db (saved queries, for example). The only thing I can't do is save a report after modifying the record source. I am able to modify the record source query and run it while editing it. No errors when I run them. Only when I try to save. Very weird...

  5. #5
    scott0_1 is offline Advanced Beginner
    Windows Vista Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    82
    I've found an ugly-ish workaround. I'm creating the query and then defining the record source in the VBA Report_Open event. At least it's saving that way.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I can only suspect that the query is corrupted, then. I'd try copying/pasting into a new one with a different name. If you can then edit and save it, I'd do one of these:
    - in a db copy delete the old query, compact and repair, then decompile it and rename the new query to what it was before
    - import all the objects into a new db, then (and only then) rename the new query to what it was before

    Access keeps object names and definitions in hidden tables. If whatever you do brings over those definitions (and if you have Name AutoCorrect enabled, name changes as well) you can still have issues. Importing into a new db is what I'd do if you have name autocorrect enabled
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    scott0_1 is offline Advanced Beginner
    Windows Vista Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    82
    I gave importing one of the reports into a blank db a try. I got an error that says "Name conflicts with existing module, project, or object library." That was after I compacted and repaired the db.

    The new weird thing is, I tried changing one of the labels on the report. Won't save. That's the only change. Grrr..

  8. #8
    scott0_1 is offline Advanced Beginner
    Windows Vista Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    82
    SOLVED IT! We had a major front-end crash a while ago and I had to restore it from old backups, but the backup didn't have the library references. I assumed I was using the DAO 3.6 library, but I just switched it to the MS Office 16.0 Access database engine object library. BAM! Suddenly the reports are saving.

    As always, thanks for the help. I think I've earned a coffee!

  9. #9
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    You're saying the whole time it was a references issue? AFAIK, the standard references in version 2016 are
    - Visual Basic for Applications
    - Microsoft Access 16.0 Object Library
    - OLE Automation
    - Microsoft Office 16.0 Access Database Engine Object Library

    If you get the Name conflicts with... message, that usually means you're trying to reference 2 of the same type of library. Sometimes it's version related; e.g. vb script. In the case of DAO 3.6, I believe it has been superseded by the database engine object. Trying to add DAO 3.6 in version 2016 will give you that error. However, you never mentioned this in the beginning, so I wonder if it's really the cause.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  10. #10
    scott0_1 is offline Advanced Beginner
    Windows Vista Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    82
    Quote Originally Posted by Micron View Post
    t. Trying to add DAO 3.6 in version 2016 will give you that error. However, you never mentioned this in the beginning, so I wonder if it's really the cause.
    Has to have been the reason. I didn't originally mention it because it didn't even occur to me until I tried to copy a report to a blank database with no references outside of the default and I got that error. Once I added the 16.0 engine object library, I still got a few errors until I moved it up in the priority list.

    If this wasn't the cause, then I had a gremlin that's moved on!

  11. #11
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Main thing is that you can now move on...
    Good luck with your db.

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

Similar Threads

  1. Save and close Excel Workbook
    By scoe in forum Access
    Replies: 5
    Last Post: 07-30-2013, 08:50 AM
  2. Every time I close or save changes
    By Opid in forum Access
    Replies: 1
    Last Post: 06-18-2012, 07:43 AM
  3. Save and close
    By brobb56 in forum Forms
    Replies: 4
    Last Post: 10-10-2011, 03:07 PM
  4. Can't save or close form
    By Buakaw in forum Forms
    Replies: 4
    Last Post: 07-26-2011, 04:47 AM
  5. form won't save and close
    By Philislost in forum Access
    Replies: 6
    Last Post: 10-08-2010, 01:47 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