Solved

Copy database button

Posted on 2008-10-28
18
235 Views
Last Modified: 2013-12-20
I need to add a button to the main form of my database that will prompt a user for a location and then copy the database to that location.  This is a reporting database and the data is only updated once a month.  The button will allow a user to view the reports when not connected to the network.
0
Comment
Question by:astina
  • 9
  • 9
18 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22821380
what do you mean by copy the database? copy the whole database where your main form is?  sorry, cannot copy an open file..

please be specific as to what you want copied.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22821411
you can create a backup copy of your db.

File>Back up datqabase

this will prompt you for a location to save the backup
0
 

Author Comment

by:astina
ID: 22821746
I actually need a full copy of the database even if i have to use code to somehow close and reopen the db.  

Is there code to use the backup option?  It sounds like that might do the same thing.  Basically I need to allow the user to put the database (.mdb file) onto a flash drive to be used on a plane, train, ect.
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22821796
just use the File > Back up database, no need for the codes
0
 

Author Comment

by:astina
ID: 22821987
I do not see the File > Back up option on my file menu. ??
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22822470
are not seeing this


BackUP.jpg
0
 

Author Comment

by:astina
ID: 22823179
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22823342
oh.. you are using A2000
do you want to do this using another small db application.
0
 

Author Comment

by:astina
ID: 22823735
As long as I can make it "transparent" to the user...lol.  This should allow the user to execute from the main form and copy or backup to a location that the user selects.
0
 

Author Comment

by:astina
ID: 22829879
I created a vb app to copy the app to another program.  I said access denied.  Any thoughts?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22830067
copy the app to another program ?
0
 

Author Comment

by:astina
ID: 22830214
Sorry...to another location...but did not work when the db was open.  Worked fine when it was closed.  Windows can copy an open db (when you right click > copy).
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22830778
is the db application an .mde or .mdb?
0
 

Author Comment

by:astina
ID: 22831328
.mdb
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 22831877
check this small .mdb
CopyDBFileApp.mdb
0
 

Author Comment

by:astina
ID: 22832875
That's a great little mdb....i will certainly use that in the future.  It does not work for this because will not copy a db that is open by another user.
0
 

Author Comment

by:astina
ID: 22832911
Is there a way we can make windows ignore that the file is open?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22833829
i already mentioned about copying an open file at http:#a22821380

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question