Results 1 to 9 of 9
  1. #1
    wolf is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    4

    Database Restore Button

    Hi guys how are you?

    Firstly I have been reading posts in the forum with many helpful solutions.

    So after spending a sunday afternoon looking for an Access Database restore solution I thought I would post my first post and see if anyone can help me out please.

    I am building database applications for my customers installed on 1 computer.



    I want to be able to add a button so once clicked a dialog box opens a replacement database can be selected and replaces the other database.

    This feature is handy if someone needs to install a new operating system or onto a new computer with the old database data.
    Can anyone please help me with some ideas. Willing to purchase a plugin if need be.

    Thank you

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Replace what database, the one they are using and with what? Unclear as to what you are asking! You are restoring a previous database from where, to replace the one you are on? Sorry, your question makes no sense to me.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    I agree with Dave - you post leaves a lot to the imagination. From a database administration/management point of view, you should have some management procedures for backing up your operational database on a routine basis. In addition, in many organizations if you are doing any development (planned changes to the operational/production database) you should have a development environment; do all development and changes and testing until you are comfortable that everything works; then move the database into an acceptance area; then migrate the changes to production.
    Each environment has standards and procedures to ensure the nothing gets into the production database without thorough test, acceptance and some auditability.

    You mention changing operating systems and a button to restore... but changing operating systems in anything but a very, very small organization would be a defined project/task that would go through a process to ensure the database and the business remain viable.

  4. #4
    wolf is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    4
    Hi, the database will be used on 1 local computer and won't be used for an organisation.

    Example the program will be used for stamp collectors. They wil be able to enter details about every stamp they have.

    Lets say there is 9000 records and one day this stamp collector decides to buy a new computer and throws out the old one. A backup of the old database is made onto a usb stick.

    He installs the database stamp collecting program on the new computer but needs to add the 9000 records he had on the old database which was on the old computer.

    I want to be able to add a button in my program Where this stamp collector can press a button choose a backup database via a form/dialog select the other database that has 9000 records and place these into the new database that is on the new computer.

    Programs like Alpha 5 give you this option. I have downloaded competing products that give the customer this option as well. I am bamboozled Access gives the developer to add an option into an application that will be distributed to perform a backup copy with no option as far as i can see to replace the database backed up with another.

    Thanks

  5. #5
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    If it is installed on one computer, how will he get access to this pc? Is he there in the office or wherever with you and the original db? Is it on a server? This does not make sense to me? I understand what you are saying and yes it can be done, it's just a import query is all. BUT, the original db has to be able to be accessed somehow! You are not saying how this will be accomplished? Where is the main pc and where is the pc that wants the updates?

  6. #6
    wolf is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    4
    Hi, This program will be sold on the internet to many different stamp collectors. It will be installed on there computer which will be on the c drive.

    Lets say for example they make a backup of the database onto a usb and the house is broken into and this computer is stolen. They buy a new computer install my program and need to update this new installation with a copy of the previous 9000 records which includes photos and attachments stored in the db.

    These customers can be located anywhere in the world.

    Joe

  7. #7
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Screenshot of an example

    So the source finally is a usb drive? Ok, here you go, you should be able to take it from here. It is a query that you run and append to a table in some database, you know the details, I don't. A simple command button could do the trick.

    If Me.Dirty Then Me.Dirty = False
    DoCmd.SetWarnings False 'Purpose: Append From USB Drive.
    DoCmd.OpenQuery "yourqueryhere"
    If Me.Dirty Then Me.Dirty = False
    DoCmd.SetWarnings True

    Good luck with your project.
    Attached Thumbnails Attached Thumbnails appendtodb.jpg  

  8. #8
    wolf is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    4

    Red face Solved

    Thanks for those that have replied.

    I thought my posts were clear enough with what was needed.

    A restore database button is one I consider to be that when the button its clicked the user chooses the database that was saved and backed up previously (whether its on CD or USB for example) and it loads into the new database importing all of the content from various tables.

    Its a feature you would need if you backed up and saved your database content whether on CD or USB where one day if your PC was stolen and you re installed the program all you need to do is upload the content or restore the database with a saved version and off you go.

    Alpha 5 has such a feature and makes restoring the database very easy. Anyway I ended up finding a solution which I have listed below.

    Step 1 - Create a button and add a Macro with output file. Choose xl file format etc. This is easy to do for a newbie and there are heaps of options you can do with this.

    This will enable you to export a table for example to an excel file onto the users desktop.

    Step 2 - To import the xl file back you need to use the DoCmd.TransferSpreadsheet acImport

    eg

    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Customers", "c:\folder\file.xls", True DoCmd.CloseTi

    If you do a search for DoCmd.TransferSpreadsheet acImport you will find a ton of solutions where you may find one that suits your needs.

    Hope it helps.

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

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

Similar Threads

  1. Start a from with restore
    By snoopy in forum Programming
    Replies: 8
    Last Post: 09-06-2012, 11:01 AM
  2. Replies: 14
    Last Post: 11-10-2011, 05:36 PM
  3. Restore menus?
    By rich in forum Access
    Replies: 2
    Last Post: 08-09-2011, 10:10 AM
  4. Access DB backup & restore
    By paulfr in forum Access
    Replies: 1
    Last Post: 09-09-2009, 04:07 AM
  5. How to restore Find dialog in Access
    By AndyKim in forum Access
    Replies: 11
    Last Post: 06-25-2009, 11:28 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