prosedur backup yang sederhana hanya mengkopi file BE ke folder tertentu,
mungkin modul ini bisa membantu, silahkan kopi-paste kan ke dalam mdl baru,
misalnya mdl_backup :

Option Compare Database

Option Explicit

Private Type SHFILEOPSTRUCT
        hwnd As Long
        wFunc As Long
        pFrom As String
        pTo As String
        fFlags As Integer
        fAnyOperationsAborted As Long
        hNameMappings As Long
        lpszProgressTitle As String
End Type

Private Declare Function SHFileOperation Lib "shell32.dll" _
Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long

Private Const FOF_ALLOWUNDO = &H40
Private Const FOF_NOCONFIRMATION = &H10
Private Const FO_COPY = &H2

Public Function ShellFileCopy(src As String, dest As String, _
    Optional NoConfirm As Boolean = False) As Boolean

Dim WinType_SFO As SHFILEOPSTRUCT
Dim lRet As Long
Dim lflags As Long

lflags = FOF_ALLOWUNDO
If NoConfirm Then lflags = lflags & FOF_NOCONFIRMATION
With WinType_SFO
    .wFunc = FO_COPY
    .pFrom = src
    .pTo = dest
    .fFlags = lflags
End With

lRet = SHFileOperation(WinType_SFO)
ShellFileCopy = (lRet = 0)

End Function

Public Sub backup()
Dim pesan As Boolean
On Error GoTo m
MkDir CurrentProject.Path & "\backupdata"
m:

pesan = ShellFileCopy(CurrentProject.Path & "\data.accdb", _
        CurrentProject.Path & "\backupdata\" & Format(Now(),
"yyyymmdd-hhmmss") & ".accdb", True)

If Not pesan Then MsgBox Err.Description

End Sub



2010/7/9 Ahmad <[email protected]>

>
>
> Buat teman2 milis, gimana caranya membuat backup BE yang filenya terpisah
> dari FE (link tabel) . Kalo lewat Menu FILE-BACK UP DATABASE yang ter-backup
> hanya FE-nya saja.
> Terima kasih sebelumnya.
>
>  
>



-- 
---------------------------------------------
   grapyak-semanak-cluthak
http://djmumun.wordpress.com
http://facebook.com/djmumun
---------------------------------------------

Kirim email ke