Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

Copy database button

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
astina
Asked:
astina
  • 9
  • 9
1 Solution
 
Rey Obrero (Capricorn1)Commented:
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
 
Rey Obrero (Capricorn1)Commented:
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
 
astinaAuthor Commented:
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Rey Obrero (Capricorn1)Commented:
just use the File > Back up database, no need for the codes
0
 
astinaAuthor Commented:
I do not see the File > Back up option on my file menu. ??
0
 
Rey Obrero (Capricorn1)Commented:
are not seeing this


BackUP.jpg
0
 
astinaAuthor Commented:
0
 
Rey Obrero (Capricorn1)Commented:
oh.. you are using A2000
do you want to do this using another small db application.
0
 
astinaAuthor Commented:
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
 
astinaAuthor Commented:
I created a vb app to copy the app to another program.  I said access denied.  Any thoughts?
0
 
Rey Obrero (Capricorn1)Commented:
copy the app to another program ?
0
 
astinaAuthor Commented:
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
 
Rey Obrero (Capricorn1)Commented:
is the db application an .mde or .mdb?
0
 
astinaAuthor Commented:
.mdb
0
 
Rey Obrero (Capricorn1)Commented:
check this small .mdb
CopyDBFileApp.mdb
0
 
astinaAuthor Commented:
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
 
astinaAuthor Commented:
Is there a way we can make windows ignore that the file is open?
0
 
Rey Obrero (Capricorn1)Commented:
i already mentioned about copying an open file at http:#a22821380

0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 9
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now