I have searched the forums and I know that you can backup data in Access to Excel or another database. What I was wondering was if there was some way to backup your data to a backup file that you could import into another copy of the database on another computer (not on network). What are the options here?:confused:
I have a button in the form of the current access file. What I want to do is when the user click on the button, triggered the vba to backup current access file. But since the file is currently open, is this possible? If yes, may I know how to do it with vba?
I have tried two methods but failed: 1) Use copytofile method, but I get permission denied due to file open; 2) Use dbengine.compactdatabase method, but it also has problem if the file is open.
I've created some code to make a backup of my database backend. I've tested it and it seems to work fine, I just have some questions about it's use. Here's the code:
Code: Public Sub backupBackend() Dim TestFile As String Dim strReplFile As String Dim copyFromLocation As String Dim copyToLocation As String copyFromLocation = "S:Trust 2 AnalysisData"
[code]....
It will be triggered by a button push. It creates a batch file to do the copy operation and then delete itself.
In an ideal world I would schedule the backup at a safe time through the Windows scheduler, but our IT department won't allow me to do so.
The concern I have is that we could potentially press the backup button while a user is performing an action that writes/modifies data. If this were to happen would my backup potentially contain corrupted data?
If so, is the workaround to simply press the backup button when nobody is using the database?
I have a database that is updated every weekday, every hour. I make a copy of it end of the day so i do not lose that data so far. I wish there was was a way to make a backup copy, say end (once sometime) of the day, automatically.
I want to open the 'Save Backup As' Dialogue Box from the file menu, using a Command Button on a Form in Access 2003.I know you can do this manually but I would love to do it programically.
When should you backup the data base and when should you use compact and repair the data base. We have been doing a compact and repair at the end of each day's shift, but one of my employes wants to only backup after the day's shift. What is the best way to backup the data base?
I often create contract using mail merge. I have an access file that I want to use as data source for word file. But it does not automatically.
Please download the attached file !
If there are 1 customer and 1 property, I do not need to do anything. Conversely, if there are many customers and many properties, I take time to manipulate.
Firstly, I open the word file. I have to copy and paste paragraphs that I want. Highlight of the original paragraphs is blue.
Secondly, I click 'Insert Word Field' -> select 'Next Record'.
In short, I wish to use VBA in access file to automatically perform the steps that I have outlined.
Ok I've been reading on backing up Dbs here. I have a db FE and BE I need to do back ups currently I backing up my FE with the autocompact db found in the sample forum but can't use it to back up my BE when it's open.
bascialy I'm trying to backup the BE daily but how do I do it if some is in it?
I recently created a database with an FE and BE, and I want to be able to back up the BE from the FE. In the FE, I added a menu item "Back up database...", and it works good for the FE, but I want it to back up the BE, where the data is located. The reason that I like the menu item is that it opens a "Save Backup As" dialog box, and it also adds the date to the name of the database. Also it will be easier for the people that are using the db.
I would like to create a module that will take a few of my tables in my database and back them up into a new database on one of my servers every day. The name and path of the database will change day by day based on the date. Can someone recommend some code...I tried this:
Dim strmydir As String strmydir = "\Jxflpr4DataDepartmentOps TechRaw Builder ArchiveArchived" & Format(Date, "YYYY-MM") & "" If Dir(strmydir, vbDirectory) = "" Then MkDir "\Jxflpr4DataDepartmentOps TechRaw Builder ArchiveArchived" & Format(Date, "YYYY-MM") & "" ElseIf Dir(strmydir, vbDirectory) <> "" Then End If
But it doesn't seem to want to copy the tables over. I tried separating the bottom half into a new function, but it still seems to be stopping for no apparant reason. It's not giving an error message, just bringing the debugger up on the second copyobject line.
Is there a better way to do this as I'm aware this code is very messy.
I was thinking of an idea to backup the database in a multiuser (FE/BE) environment, without disturbing the users. Please comment on it as if it has any drawbacks.
And also soemeone please help me do this, if its does not contain drawbacks.
************************************************** ******** Main Idea
What I want is to automate backup process at fixed intervals, in a FE/BE environment without disturbing the users i.e without disconecting the users. And I think it is possiblke and safe to do if we start the backup process when all users are inactive and stop any user activity or stop Frontend's interaction to the Backend, while in the backup process.
And If no such time is available as all users are inactive within a certian time then forcefully stop user interaction to the backend and start backup process.
To stop user interaction with the backend , we can close all objects (forms, reports, queries etc) and open an unbounded modal pop-up form , with no close exit button. This form can have timer and after 30 seconds or maybe 1 minute we can auto close this form so that the user can again use the application. We can stop new logons by placing an ini file in the folder where the Backend rsides. This Ini file can contain two keys ( "lock time" and "lock status"). At the frontend startup we can query these value from the inifile to check that new logons are allowed or not, and if the "lock time" is greater than 2 minute then bypass the lock status and allow new logons. It means that something went wrong with the last backup process and the ini file was not updated to new lock status. We can have a table or an in file store the normal and maximum time at which the backup process starts. These values can be queried and compared with the current time using a hidden form. If the normal time exeeds the current time then start looking for a state where all logged on users are inactive (i.e all objects are closed in the front end of all users). If such a state is found then warn the user that backup is going to start in 1 minute, lock new logons, after 1 minute close all open objects and then bring up a modal form that i have described in step 1 and start bakup process. And if no state is fount till the maximun time then warn all users that backup would start in 1 minute, lock new logons, after 1 minute close all open objects and then bring up a modal form that i have described in step 1 and start bakup process After the backup is complete set allow new logons in the inifile.
I'm having trouble with some code to backup my database. I thought I'd just have some code call a batch file that copies the backend to a new location. The problem is that when I call the batch file, it opens and runs from c:documents and settings\%username%, so the relative paths in my batch file do not work.
Is there a way to have access tell run the batch file from command prompt in it's actual location? Or maybe it would be better just to copy the back end from within the VBA code. But I don't know how to do that, either. Maybe there's a way to use the Backup Database function under Tools/Database Utilities? With Sendkeys maybe? (but I don't know the code to do it).
i have a db which is split into frontend and datatables, what i need to do is place a command button on the switchboard which allows me to backup the second part of the db. then if needed i need to be able to restore the datatables to the original location so there is no loss of data. if anyone can help this would be most appreciated. i know there is a few threads out there ref data backup but i've been unable to locate any answers
what would possibly cause a "Backup Database As" dialogue box to appear? it's the same as the "save as" box and allows you to save a copy of the access file you're working on but it says "Backup Database As" at the top.
it seems to come up periodically and im not sure what might be causing it.
I have a small mdb database that I archive every week, usually during the archive I delete all the forms expect (logon, switchboard, and three others) and keep the tables, queries, and reports. (use the forms to only enter data, which are not needed for the archive and deleting them reduces the file size)
is it possible to have something in vb, - that will run if its Friday 5pm - will backup the data base to a location on a mapped drive, - with a given file name mmddyy_data.mdb, - and have all but the 5 forms (mentioned above) deleted
I created a database in Access and of course password protected the backend version. As a matter of course I backed up the mdb to cd in case of emergency.
Our network has been taken down due to some virus being bought in by a laptop user so I wanted to reinstall the mdb from the cd to my c: drive.
The problem is that the file is saying that it is 'Read Only' which I think is down to the password protection i put on there.
Question: Is there a way I can get round the security?
I read a lot of threads and some KB articles before this, but am still confused.
Can a copy of the BE database be made on the Server while users are logged on ? Max No. of users is 7.
Does copying a BE while work is going on lead to corruption in the database. Right now i make a copy of the database thru code and then compress the copy for a backup.
I have a front end MDE and a backend MDB. From the front end using Visual Basic I want to be able to backup, compact and repair my database. If anyone can point me in the right direction it would be appreciated.
I have a restore from BackUp form. When the form is activated it runs this code
Code: Private Sub Form_Activate() Dim strRestore As String strRestore = "C:GungogManagerBackUp" If Len(Dir(strRestore, vbDirectory)) = 0 Then MsgBox ("There are no BackUp files available"), vbOKOnly Me.btn_Restore.Enabled = False
[code]...
It was working, but since adding the bit in red its not working. I basicly want it to look for the directory and if it dosent find it the pop up with message, but if the dir does exist then to populate the combo.