Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    mrlddst is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2014
    Posts
    22

    Compact and Repair Encrpyted Database Problem


    I have an MS Access 2007 accdb file that I no problems with when it is not encrypted. I can compact and repair with no problems. However, when I encrypt the database and try to compact and repair the file, I get 'invalid argument'. The file is 101 MB, I'm not at the 2 GB limit by far. Any suspicions? This file was recently imported into 2007 from 2003 (accdb from mdb). I have had the users testing it extensively. The problems comes once I encrypt the file.

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    My guess is that it is a Password problem. Is is password protected? Is your db split?

  3. #3
    mrlddst is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2014
    Posts
    22
    I thought when I "Encrypt with Password" per Access 2007 that I was protecting the database with a password. I'm I incorrect in that assumption? No the db is not split.

  4. #4
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    How exactly are you trying to Compact the db, is it in Design mode or by code?

  5. #5
    mrlddst is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2014
    Posts
    22
    I guess its Design mode.
    Manage Database > Compact and Repair

  6. #6
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    I guess I don't understand. Try holding down the shift key when Compacting with the password.

  7. #7
    mrlddst is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2014
    Posts
    22
    Could it be related to uncompiled code in the VBA related to the forms? I took this over from someone else and it has a few compile errors but in Real-time it never has a problem because the forms related to the code that don't work are not used.

  8. #8
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Don't know. Try Compiling and see what happens.

  9. #9
    mrlddst is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2014
    Posts
    22
    Errors! I'm not a VBA expert by far.

    "Qualifier must be a collection"

    I don't see a DRAMT Form in VBA, there is a module, with nothing in it with the same name though.

    Private Sub DRAMT_AfterUpdate()
    If [APPROP] = [DRAMT]![APPROP] Then
    [DRAMT] = [DRAMT]![AMOUNT1]
    End If
    End Sub

  10. #10
    mrlddst is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2014
    Posts
    22
    Quote Originally Posted by mrlddst View Post
    Errors! I'm not a VBA expert by far.

    "Qualifier must be a collection"

    I don't see a DRAMT Form in VBA, there is a module, with nothing in it with the same name though.

    Private Sub DRAMT_AfterUpdate()
    If [APPROP] = [DRAMT]![APPROP] Then
    [DRAMT] = [DRAMT]![AMOUNT1]
    End If
    End Sub
    Nevermind on that error. I realized that the orginal author of the code was trying to call a query not a form with his code.

  11. #11
    mrlddst is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2014
    Posts
    22
    Ok, I worked through the compile errors. I compacted and repaired again with no password and again, it worked fine. I added password protection and tried to repair and compact and same error again.

  12. #12
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Are you Opening the db while holding down the shift key? If you try and Compact this way, do you still get an error?

  13. #13
    mrlddst is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2014
    Posts
    22
    Quote Originally Posted by burrina View Post
    Are you Opening the db while holding down the shift key? If you try and Compact this way, do you still get an error?
    Yes, that is the only way I know how to open it for development. Yes, I still get this error but only when encrypted with a password.

  14. #14
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Don't know what to make of it without seeing it. Have you tried importing the objects into a new db and see if the error persist?

  15. #15
    mrlddst is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2014
    Posts
    22
    Trying it now. Thx for helping me!

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Compact and repair
    By data808 in forum Access
    Replies: 4
    Last Post: 03-30-2014, 03:22 AM
  2. Compact and Repair
    By Cyberice in forum Access
    Replies: 3
    Last Post: 03-18-2014, 03:22 PM
  3. Will database auto compact and repair on the server?
    By squirrly in forum Programming
    Replies: 8
    Last Post: 04-15-2013, 02:37 PM
  4. Compact and Repair Database "Bombs"
    By GraeagleBill in forum Access
    Replies: 16
    Last Post: 09-27-2011, 09:23 AM
  5. Replies: 7
    Last Post: 11-11-2010, 11:16 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