Forms :: Restoring From BackUp
Nov 20, 2013
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.
View Replies
ADVERTISEMENT
Feb 27, 2013
In our forms, we have managed to export a backup of our application (to accdb file) in a specific folder.
We now are trying to make a backup restore function that restores the backup (the accdb file).
However, we have some difficulties with restoring this backup in a form (like browsing for this specific backup file).
How to make this restore function?
View 1 Replies
View Related
Jun 26, 2005
I'm sure there must be a simple answer to this question but I have been unable to locate the answer.
I recently finished a database program under Access 97 and unchecked the boxes to allow menus. Now I need to fix a few mistakes and need to access my code or the menus to do this. Is there a way to get access to my code.
Any help would be appreciated.
Thanks
rtamd
View 2 Replies
View Related
Nov 30, 2005
Hello,
Is there anyway possible to restore a database to a former state?
what happens is that I updated some information unknowingly, now I get into my database, and I cant find some data, which I suppose i updated probably the last time I worked on a the table.
Any clues on how to handle this?
View 1 Replies
View Related
Jul 11, 2006
Hi
Hoping someone can help me here. I have a form which is maximised on startup which also has the min/max and close button disabled. What i'd like to do is also prevent the user from restoring the form to ie. click the restore button which then makes the form smaller as i'd like the form to permanently remain maximised.
I'm not sure if this is possible, but if not is there a way to size the form to fit the height and width of the screen as if it was maximised regardless of the screen resolution the user is using.
Any help would be appreciated.
View 3 Replies
View Related
Apr 6, 2014
I have this code that backs up all my tables in the same folder.I want to however back up only specified table with names; operational areas, Communities, Zones and Projects.how to integrate that into my existing code or any other way to achieve that
Sub backup()
Dim dTime As Date
On Error Resume Next
dTime = InputBox("Create a backup at", , Time + TimeValue("00:00:05"))
[code]...
View 6 Replies
View Related
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
View 8 Replies
View Related
Sep 21, 2005
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?
View 12 Replies
View Related
Dec 17, 2006
what is, or does it exist, the T-SQL command to backup an MS Access database. is this possible?
View 1 Replies
View Related
Dec 12, 2006
Hello,
I was thinking of some way to backup my database.
Is there a way I can save a certain number of tables (4) to a different location on my hard drive via code? Thanks.
View 2 Replies
View Related
Jul 6, 2005
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.
View 1 Replies
View Related
Oct 13, 2005
Hiya,
I have a database which on exit runs calls the following module and backs up the database to anther folder
Public Function BackupCopy()
'This function will allow you to copy a db that is open,
'You must set a reference to the 'Microsoft Scripting Runtime' for the CopyFile piece to work!
Dim fso As FileSystemObject
Dim sSourcePath As String
Dim sSourceFile As String
Dim sBackupPath As String
Dim sBackupFile As String
sSourcePath = "C:Database"
sSourceFile = "MyDB.mdb"
sBackupPath = "C:DatabaseBackups"
sBackupFile = "BackupDB_" & Format(Date, "mmddyyyy") & "_" & Format(Time, "hhmmss") & ".mdb"
Set fso = New FileSystemObject
fso.CopyFile sSourcePath & sSourceFile, sBackupPath & sBackupFile, True
Set fso = Nothing
Beep
MsgBox "Backup was successful and saved @ " & Chr(13) & Chr(13) & sBackupPath & Chr(13) & Chr(13) & "The backup file name is " & Chr(13) & Chr(13) & sBackupFile, vbInformation, "Backup Completed"
End Function
but after backing up correctly it brings me the following error
"Run-time errror '424':
Object required
any ideas what might be going wrong
Cheers
View 1 Replies
View Related
Jan 31, 2006
Hello all,
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
Dim dbs As Object
Dim strdb As String
strdb = "\Jxflpr4DataDepartmentOps TechRaw Builder ArchiveArchived" & Format(Date, "YYYY-MM") & "" & Format(Date, "YYYY-MM-DD") & ".mdb"
Set appaccess = CreateObject("Access.Application")
appaccess.NewCurrentDatabase strdb
Set dbs = appaccess.CurrentDb
appaccess.CloseCurrentDatabase
DoCmd.CopyObject strdb & Format(Date, "YYYY-MM") & "" & Format(Date, "YYYY-MM-DD") & ".mdb", "tbl_master", acTable, "tbl_master"
DoCmd.CopyObject strdb & Format(Date, "YYYY-MM") & "" & Format(Date, "YYYY-MM-DD") & ".mdb", "tbl_excluded", acTable, "tbl_excluded"
DoCmd.CopyObject strdb & Format(Date, "YYYY-MM") & "" & Format(Date, "YYYY-MM-DD") & ".mdb", "tbl_allelse", acTable, "tbl_allelse"
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.
Thanks in advance!
Vassago
View 5 Replies
View Related
Mar 27, 2006
is it alright to backup the backend while the database is in use by other users connected through front end or users must log off before the backup
View 11 Replies
View Related
Apr 20, 2006
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.
************************************************** ********
How to:
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.
View 1 Replies
View Related
Nov 20, 2006
hi,
every time i look in or shared area i see a new backup file of one of my mde's...
junior school pastoral log_backup
it seems every time i delete one a new on is there next time...
what's causing this? is a user not logging out of the software properly or what?
cheers
greg
View 6 Replies
View Related
Jan 22, 2007
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).
View 8 Replies
View Related
Mar 10, 2005
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
View 14 Replies
View Related
Jul 10, 2006
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.
thanks
View 2 Replies
View Related
Jul 3, 2006
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
View 3 Replies
View Related
Feb 13, 2006
Hi All,
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 promise I am not a hacker!
Cheers
Smudger
View 2 Replies
View Related
Feb 2, 2008
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:
View 1 Replies
View Related
Jun 12, 2006
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.
View 2 Replies
View Related
May 29, 2006
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.
Thanks!
View 14 Replies
View Related
Oct 5, 2014
I am using the following code to backup the tables on my "D" Drive..I want to add a code by which it not only save backup on my drive but also send these files to my email address XYZ@gmail.com
Dim CurrentDay As String
Dim CurrentMonth As String
Dim CurrentYear As String
CurrentDay = Day(Now)
CurrentMonth = Month(Now)
CurrentYear = Year(Now)
[code]...
View 9 Replies
View Related
Aug 14, 2011
Not sure where this question must be posted! I would like to create code in VBA to backup tables in access. I am not sure where to begin, but what I would like to do is the following:
When the user signs in I want to backup the database/tables
When the user sign off I want to back up the database/tables.
View 2 Replies
View Related