Solved

Copy database button

Posted on 2008-10-28
18
233 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 119

Expert Comment

by:Rey Obrero
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 119

Expert Comment

by:Rey Obrero
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
 
LVL 119

Expert Comment

by:Rey Obrero
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 119

Expert Comment

by:Rey Obrero
ID: 22822470
are not seeing this


BackUP.jpg
0
 

Author Comment

by:astina
ID: 22823179
0
 
LVL 119

Expert Comment

by:Rey Obrero
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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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 119

Expert Comment

by:Rey Obrero
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 119

Expert Comment

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

Author Comment

by:astina
ID: 22831328
.mdb
0
 
LVL 119

Accepted Solution

by:
Rey Obrero 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 119

Expert Comment

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

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

867 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now