VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Restore database(for Ms Access only)

by Esmael Telmosa (7 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Fri 16th June 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Restore database(for Ms Access only)

API Declarations


Dim CommondialogControl As Control

Rate Restore database(for Ms Access only)



    'Ask the filename of Back-Up
    CommondialogControl.Filter = "Back-Up Files(*.mdb)|*.mdb"
    'Set a deafault DIR
    CommondialogControl.InitDir = "C:\"
    'Display the Open Dialog Window
    CommondialogControl.ShowOpen
    
   On Error GoTo Opps
   'if  there is a filename selected
   If CommondialogControl.FileName <> "" Then
        'overwrites the existing Back-Up Files w/ the Copied One
'''''''''Overwrites strSource with CommondialogControl.Filename
         FileCopy CommondialogControl.FileName, StrSource
        'display the path and filename of database
        'Text1.Text = CommondialogControl.FileName
        'prompt to user that Restoration is successful...
        MsgBox "Restore Complete!", vbInformation, "RESTORE SUCCESSFUL"
   End If
   Exit Sub
   
Opps:
    MsgBox Err.Description, vbExclamation, " "
   
End Sub

Download this snippet    Add to My Saved Code

Restore database(for Ms Access only) Comments

No comments have been posted about Restore database(for Ms Access only). Why not be the first to post a comment about Restore database(for Ms Access only).

Post your comment

Subject:
Message:
0/1000 characters