Results 1 to 4 of 4
  1. #1
    pacnwWill is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    2

    mdb save problems with Access 2010

    Hi all, Access rookie seeking help here. We've got both Access 2007 and 2010 running as front ends for our SQL db on several computers at work. I've got a small Autoexec VBA program to automatically update the Access database that is loaded on everyone's desktop:

    Code:
     
    '>>Here's the declaration:
     
    Option Compare Database
    Option Explicit
    Declare Function apiCopyFile Lib "kernel32" Alias "CopyFileA" _
    (ByVal lpExistingFileName As String, _
    ByVal lpNewFileName As String, _
    ByVal bFailIfExists As Long) As Long
    Sub CopyFile(SourceFile As String, DestFile As String)
    Dim Result As Long
       If Dir(SourceFile) = "" Then
          MsgBox Chr(34) & SourceFile & Chr(34) & _
             " is not valid file name."
       Else
          Result = apiCopyFile(SourceFile, DestFile, False)
       End If
    End Sub
    
     
    '>>Here's the autoexec fxn:
     
    Function DatabaseLoad()
        
    On Error Resume Next
        
    If DLookup("VersionID", "tblVersion") <> DLookup("VersionID", "tblVersionMasterELISA Log") And Err = 0 Then
     
    MsgBox "Your version of " & CurrentProject.Name & " is out of date." & Chr(13) & Chr(10) & "Please reopen the database after it closes.", vbInformation, "Updating database"
                    
    CopyFile "X:\Database.mdb", CurrentProject.FullName
    
     
    Application.Quit acQuitSaveNone
    
    End If
                
    End Function


    Specific error is that the switchboard form on the db does not load using Access 2010 after the update. Everything else seems to work. Also impossible to manually open or design form after the update, since Access says it now cannot recognize data in that form ?! 2007 Access works perfectly, no problems.


    I've already turned off everything obvious in the Trust Center, as well as designated my source location as a trusted location. Plz help!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Don't do design edits in 2010 version. File will probably not be backward compatible, in spite of the common file name extension.

    You say the edits in 2007 make the form not run in 2010? That is odd. You say 'macro' but looks like VBA code. How was the switchboard originally created - by wizard? Try rebuilding it manually from scratch.
    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
    pacnwWill is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    2
    Thanks for the reply. Yes, it's VBA code in the Autoexec module, running automatically on db load. Sorry, not sure what you mean by "design edits", since I'm just trying to copy over the entire db - i.e. replacing the old desktop copy on each user's workstation with the updated version sitting in X: drive.

    Ya, the switchboard not loading on 2010 is really strange, since everything else seems to work. I'll try redesigning the form per your suggestion and see if that helps. At this point, I'm guessing that it's basically file compatibility issues between 07 and 10? Thanks.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    By design edits I mean creating/modifying objects (tables, queries, forms, reports) and code.
    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.

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

Similar Threads

  1. Importing CSV file into 2010/creating save import routine
    By rbtrout in forum Import/Export Data
    Replies: 5
    Last Post: 08-05-2011, 08:54 AM
  2. Replies: 17
    Last Post: 08-03-2011, 05:19 PM
  3. Replies: 9
    Last Post: 01-20-2011, 02:22 PM
  4. Problems with data entry form Access 2010
    By OfficeQuestions in forum Access
    Replies: 4
    Last Post: 09-23-2010, 01:42 PM
  5. Replies: 5
    Last Post: 07-19-2009, 08:37 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