Link to home
Start Free TrialLog in
Avatar of astina
astina

asked on

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.
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

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.
you can create a backup copy of your db.

File>Back up datqabase

this will prompt you for a location to save the backup
Avatar of astina
astina

ASKER

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.
just use the File > Back up database, no need for the codes
Avatar of astina

ASKER

I do not see the File > Back up option on my file menu. ??
are not seeing this


BackUP.jpg
Avatar of astina

ASKER

oh.. you are using A2000
do you want to do this using another small db application.
Avatar of astina

ASKER

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.
Avatar of astina

ASKER

I created a vb app to copy the app to another program.  I said access denied.  Any thoughts?
copy the app to another program ?
Avatar of astina

ASKER

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).
is the db application an .mde or .mdb?
Avatar of astina

ASKER

.mdb
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of astina

ASKER

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.
Avatar of astina

ASKER

Is there a way we can make windows ignore that the file is open?
i already mentioned about copying an open file at http:#a22821380