Auto Backup On Entire Database Close / Forms Included
May 10, 2014
I have a database with multiple forms and I would like to on close I would assume of the form, save a backup to a specific folder. This will all change once I move the database to the server but for now want a backup on my machine. Here is my code:
Code:
Private Sub Form_Close()
Call db_backup
End Sub
Below is in a module
[code]...
The problem is when I run this the program will give me an error saying: runtime error 438 object does not support this property or method
I am building a database where one Form displays records from 14 different tables. For some reason, when I recently try to add a field on to a form from a new table, the ENTIRE form loses the record source, and every single field that is already on the form gets that green dot in the corner with errors surrounding a record source that cannot be found. What am I doing wrong? Am I exceeding some limitations with forms?
hi All, I've included an extremely cut down version of my database (33k zip file) with the example I'm trying to do.
There is a Combo Box (three options), I basically want this box to switch to the relevent record. (e.g. if you select Rural, it will switch to the next rural record) Rather, the combo box is changing the field of the current record to Rural which I don't want it do. I also want the ability to "Filter by Selection" too which it does but it just changes the current record :(
Any help would be GREATLY appreciated! It's been driving me crazy for days now.
If you click on "FOCUS OF SERVICE", the combo box in question is called "AREA" that is located up the top.
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.
Hi We have a number of forms in our database. Each one is opened from a Main menu form or one of a number of sub-menu forms. However, after a while we are realising that every time we are using a form unless we specifically close it, it stays open. How would we automatically close a form when another one opens ?
Hi :rolleyes: I would like when I click a button for the system to automatically create a copy of the whole database and place it into a separate folder. How would I do this??? :confused:
Is there a way to search an entire database? Almost like a Google search where a user could put in a few key words and it would retrieve all records no matter which fields the key words appeared in?
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.
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 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 am running an autocompact module in Access97 which will created a 'compacted version' of my database. I then want to rename this compacted version to the name of the original database I compacted. I cannot however find a way of doing this in code.
Basically the idea is to compact every 45 minutes or so, but what my autocompact is doing is creating a compacted version under a different name, and so compacting a copy of the database, I then want to change this compacted database name to the original name and re compact every 45 mins
I have access BD and every one use it through shared folder. My problem is in attachment ! , if i use the regular attachment filed in access there is one user only able to attach files and others can`t attach any thing until he finish.
I tried to do attachment through VBA like below which make it worse as it lock the DB so, no one can even open the DB and one user only access the DB .
Dim db As DAO.Database Dim rsParent As DAO.Recordset2 Dim rsChild As DAO.Recordset2 Set db = CurrentDb Set rsParent = me.Recordset
[Code] .....
How multi users attach files at the same time without locking the DB.....
I wonder if by any chance it is possible to create a search bar that scans the entire database- or lemme say the fields i assigned to such search bar- that can be put in the switchboard or so.
According to my level of understanding of access, this should be a query.
However, is it possible to make it appear like a search bar that could be placed where I want it; in this case in the switchboard??
Not a very important question and is just for aesthetics however is there a way to make every form, every command button the same colour, font, size etc?
I have selected a theme however it does not change all forms, labels, text boxes, etc
I don't really want to have to go change them all one by one
For example I would like to get rid of all the navigation on all my forms can you change it over whole database or just individually?
We are currently running a FE / BE splitted database abd would like to back the back end up (to a sepearate location) every 15 minuutes by using the On Timer event.
Troiuble is, I believe I cant use the CopyDataBaseFile method whilst other users are in it and it would be too much hassle kicking everyone off!
Manually copying and pasting is good, but would really like to crack this one
-Table MA's. is the just a table were you can select if an Analyst is at the office or not. so if the check box is selected the analyst is available.
-Table Backups. We have Alias which is a reference code to a supplier the 1 Analyst and then Backup 1 and backup 2
-Table suppliers are just de supplier details.
what i whould need is when in the MA's table an Analyst is not selected a macro or query should search for backup 1 and replace it. when the backup 1 is not available as wel than backup 2 should be put in place.
When no backups are availeble then a message can put in the cell like"No Backup Available'.
This result can be put in a new table named. Decksplit with then the Supplier Alias, Supplier Name, Analyst
As my database is growing and hold more and more data i want to make a daily backup to the local hard disk (it works on a network now) automatically.The way i want it to work is as follows :
When a user quits the application i want to check if there is a copy already existing with the date of today.
If it does it skips the copy process and just quits.
If it doesn't, i want it to make a backup in a directory. if the directory doesn't exist it must be made.
The backup file name must hold the date of today off course.
I realize that i have to have a procedure to delete obsolete (outdated) backups as well, but ill worry about that later.
Off course Ive tried this a few times, otherwise i wouldnt ask it here. But i seem to fail every time..
Is it possible to create a command button on an Access switchboard that will automatically backup a database? What code would I need? The command button wizard doesn't handle this task.
I have developed an access database, and prepared its run time exe file. My question is how to develop the database so that the user can regularly backup the database?