Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Backup Database Button

Discussion in 'Information Technology' started by Trial & Error, Oct 28, 2005.

  1. Trial & Error

    Trial & Error
    Expand Collapse
    Guest

    The database I am working on will eventually have several security levels.
    One level will allow the user to access tables & make complete alterations
    to the system etc... they would also have access to the toolbars in order to
    back up the database...

    Is there any way to program a button to run the database backup??

    I do not want ALL of my staff to have access to the design level of the DB..
    but I DO want any of my staff be able to backup the DB.

    I know that the toolbox "create button" command has many options... but
    running a backup is not one of them.

    I imagine this is quite possible... just interested in how its done.

    If anyone has the actual code handy, that would be much appreciated.

    Thanks
     
  2. Loading...

    Similar Threads Forum Date
    USA NSA has massive database of Americans' phone calls (USA Today 5.11.2006) Breaking News Jun 11, 2013
    Some database errors while navigating SPN forums Announcements Dec 29, 2004

  3. MA

    MA
    Expand Collapse
    Guest

    Trial & Error wrote:
    > The database I am working on will eventually have several security
    > levels. One level will allow the user to access tables & make
    > complete alterations to the system etc... they would also have access
    > to the toolbars in order to back up the database...
    >
    > Is there any way to program a button to run the database backup??
    >
    > I do not want ALL of my staff to have access to the design level of
    > the DB.. but I DO want any of my staff be able to backup the DB.
    >
    > I know that the toolbox "create button" command has many options...
    > but running a backup is not one of them.
    >
    > I imagine this is quite possible... just interested in how its done.
    >
    > If anyone has the actual code handy, that would be much appreciated.
    >
    > Thanks

    Compact the backend when all the users are offline
    Than instead of kill the old file you can duplicate the newone
    You can find something ion
    www.sitocomune.com It's an italian website

    --
    _ _
    Ciao
    MAssimiliano Amendola www.accessgroup.it
    Cisa - Conferenza Italiana per Sviluppatori Access
    Info: www.donkarl.com/it
     
  4. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    The code is fairly easy:

    Private Sub BackUpDBBtn_Click()

    On Error GoTo ErrHandler

    CommandBars("Menu Bar").Controls("Tools"). _
    Controls("Database utilities").Controls("Back up database..."). _
    accDoDefaultAction

    Exit Sub

    ErrHandler:

    MsgBox "Error in BackUpDBBtn_Click( ) in" & vbCrLf & _
    Me.Name & " form." & vbCrLf & vbCrLf & _
    "Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
    Err.Clear

    End Sub ' BackUpDBBtn_Click( )

    It depends upon the version of Access running this for whether or not it
    will work successfully. (Access 2003 SP-1 doubles the size of the file
    before it crashes, but it does make the back up.) However, one shouldn't
    back up the currently open database. It's better to back up a closed
    database from the current database.

    HTH.
    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips.

    (Please remove ZERO_SPAM from my reply E-mail address so that a message will
    be forwarded to me.)
    - - -
    If my answer has helped you, please sign in and answer yes to the question
    "Did this post answer your question?" at the bottom of the message, which
    adds your question and the answers to the database of answers. Remember that
    questions answered the quickest are often from those who have a history of
    rewarding the contributors who have taken the time to answer questions
    correctly.


    "Trial & Error" wrote:

    > The database I am working on will eventually have several security levels.
    > One level will allow the user to access tables & make complete alterations
    > to the system etc... they would also have access to the toolbars in order to
    > back up the database...
    >
    > Is there any way to program a button to run the database backup??
    >
    > I do not want ALL of my staff to have access to the design level of the DB..
    > but I DO want any of my staff be able to backup the DB.
    >
    > I know that the toolbox "create button" command has many options... but
    > running a backup is not one of them.
    >
    > I imagine this is quite possible... just interested in how its done.
    >
    > If anyone has the actual code handy, that would be much appreciated.
    >
    > Thanks
    >
    >
    >
     

Share This Page