Back up split database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bborden51@NoSpamgmail.com

    #1

    Back up split database

    I'm surprised that when I go to File-->Backup Database within Access
    only the front end is backed up.

    Surely I'm missing some setting that I have to select so Access backs
    up both front end and back end.

    Any ideas?

    Thanks

  • pietlinden@hotmail.com

    #2
    Re: Back up split database

    you're surprised? Umm... and how exactly is Access supposed to figure
    out you're using a split database unless you tell it? Write a batch
    file?

    Umm... am I supposed to be surprised that you're not psychic and didn't
    figure this out/read my mind?

    Comment

    • Tony D'Ambra

      #3
      Re: Back up split database

      You need to open the back-end and back it up...

      Tony D'Ambra
      Web Site: aadconsulting.c om
      Web Blog: accessextra.net

      "bborden51@NoSp amgmail.com" <bborden51@gmai l.com> wrote in message
      news:1102798413 .644382.244550@ c13g2000cwb.goo glegroups.com.. .[color=blue]
      > I'm surprised that when I go to File-->Backup Database within Access
      > only the front end is backed up.
      >
      > Surely I'm missing some setting that I have to select so Access backs
      > up both front end and back end.
      >
      > Any ideas?
      >
      > Thanks
      >[/color]


      Comment

      • Tony D'Ambra

        #4
        Re: Back up split database

        You need to open the back-end and back it up...

        Tony D'Ambra
        Web Site: aadconsulting.c om
        Web Blog: accessextra.net

        "bborden51@NoSp amgmail.com" <bborden51@gmai l.com> wrote in message
        news:1102798413 .644382.244550@ c13g2000cwb.goo glegroups.com.. .[color=blue]
        > I'm surprised that when I go to File-->Backup Database within Access
        > only the front end is backed up.
        >
        > Surely I'm missing some setting that I have to select so Access backs
        > up both front end and back end.
        >
        > Any ideas?
        >
        > Thanks
        >[/color]


        Comment

        • Jim M

          #5
          Re: Back up split database

          Question: I didn't know there was a "File-->Backup Database" command in
          Access. I am using Access 2002 (XP) and have never seen that menu
          option. Is it only in Access 2003? or do you require certain references
          or add-ins for it to work?

          Thanks!
          Jim

          Comment

          • bborden51@NoSpamgmail.com

            #6
            Re: Back up split database

            Jim: It does exist in Access 2003 but I found out that it was not in
            Access 2002.

            I wish it would backup the program AND it's linked tables instead of
            just the programs but I just put a button VB procedure on a form to
            backup the tables. I copied some of the code from this NG. Here it
            is:

            Private Sub cmdBackupTables _Click()
            sAppFileBruce =
            "C:\SurgeonData base\Backup\Bac kupforBruce\Bru ceTableBackup" &
            DatePart("m", Date) & DatePart("d", Date) & DatePart("yyyy" , Date) &
            ".mdb"
            sAppFileOld = "C:\SurgeonData base\Backup\Old TableBackup.mdb "
            sAppFileBak = "C:\SurgeonData base\Backup\Cur rentTableBackup .mdb"
            sAppFileData = "C:\SurgeonData base\Program\Wo rkingTableDB_be .mdb"

            Dim cnn As ADODB.Connectio n
            Dim rst As New ADODB.Recordset
            Set cnn = CurrentProject. Connection
            rst.ActiveConne ction = cnn
            rst.Open "SELECT * FROM tblCompanyFacts ", cnn, adOpenKeyset,
            adLockOptimisti c, adCmdText
            rst.MoveFirst

            If rst.Fields("Bac kupCounter") >= 3 Then
            If Len(Dir(sAppFil eBruce, vbDirectory)) <> 0 Then
            Kill sAppFileBruce
            End If
            FileCopy sAppFileData, sAppFileBruce
            rst.Fields("Bac kupCounter") = 0
            End If

            Kill sAppFileOld
            FileCopy sAppFileBak, sAppFileOld
            Kill sAppFileBak
            FileCopy sAppFileData, sAppFileBak

            MsgBox "Your Data Table has been backed up!", vbOKOnly

            rst.Fields("Bac kupCounter") = rst.Fields("Bac kupCounter") + 1
            rst.Fields("Las tBackup") = Date()
            rst.UpdateBatch
            tboLastbackup.R equery
            rst.Close
            Set rst = Nothing
            Set cnn = Nothing

            End Sub

            Comment

            • Jim M

              #7
              Re: Back up split database

              is the code you are using adding records to a single backup database?
              Just a thought about this: Coudn't you use the VBA copyfile procedures
              using the scripting file system objects that are listed in Helen
              Feddema's stuff referenced above. Youc could modify them to copy your
              back end file instead of the Current Database, as she has the code.
              This would give you a newly named file each time you back up. I'm not
              sure the code you are using does that... (I always struggle reading
              other people's code.)

              I am trying to figure out a way to:

              1) Backup the database, then
              2) Run compact and repair with the push of a button.

              Helen's code looks like it could handle the backup with a little
              modification.

              The tricky thing with this is that I need to disconnect all the links
              before I can compact and repair. I would then want to restore the
              links. It should not be too hard.

              My end users have a hard time remembering to open the back end to
              compact and repair...

              Comment

              Working...