472,353 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

how to save the database in vba?

Hi,

I dont seem to find a way to save the current database in Access, I just want to do same thing as the Save-button or save-as-button of Access, is there some kind of VBa-code?
like currentdatabase.save???

In fact I want to make an automatic back-up routine, and thought to do this by saving ervy 10 minutes to another name and saving back to the original...
I have had problems myself with access and losing much data...

thx
Jan 23 '12 #1

✓ answered by NeoPa

There is no such facility in Access Plynius. You would need to make a copy of the whole database file (when it's not in use preferably).

8 12335
Mihail
759 512MB
Is no reason to do that because each time a record is updated all modifications are saved automatically. You do not risk to loose data as in Excel (for example) where is needed to push the Save button after you modify something in the sheet.
Jan 23 '12 #2
hi,

I wanted to make a back-up system, so safe the file to another name. Or is there another way to do so?

thanks for answering my question
Jan 23 '12 #3
Mihail
759 512MB
Copy the file then rename it as you wish.
Jan 23 '12 #4
NeoPa
32,511 Expert Mod 16PB
There is no such facility in Access Plynius. You would need to make a copy of the whole database file (when it's not in use preferably).
Jan 23 '12 #5
Seth Schrock
2,965 Expert 2GB
If you do backups on your computer, just add the folder that contains the database to the backup list. There are many options for backing up a file of any kind automatically. You can do online backups through websites such as dropbox.com which backs up the selected folders whenever there is a change. You can also use the backup tools that come with Windows OS and Mac OS. I'm pretty sure that Linux also comes with a built-it backup tool. All you would need is an external hard drive or another computer. You can then do scheduled backups. Do a Google search for how to back up your computer and you will find many options. If your computer is backed up and your computer crashes, then you can restore your database from the backup. However, like NeoPa said, this isn't done through Access.
Jan 24 '12 #6
TheSmileyCoder
2,322 Expert Mod 2GB
There are things you can do from within access, but it depends on the nature of your application. Are you the only user, or are there multiple users for instance?

In some cases it could be as simple as having a procedure that creates a copy of the database when the user logs on.

Another option could be to use a system like KeepIt.Com for taking online backup.

I would not recommend DropBox for taking backup. If you have your db located in a dropbox synchronized folder it can severely affect performance and increase the risk of corruption.


If corruption is the main cause of your data loss, I can add that I used to experience a fair share of database corruption in Ac2003, but after following these simple steps I have had no corruption since then:
  1. Never edit running code. If your in debug mode, its fine to see where the error is occuring, but after you've viewed the location, kill the process.
  2. Do your edits, then Compile.
  3. Only run compiled code.
Jan 24 '12 #7
Mihail
759 512MB
Good to know, Smiley !
Jan 24 '12 #8
Thx for the hints everyone, Im trying just to copy the file automaticaly in access every 15 minutes...
Jan 25 '12 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Andras Gilicz | last post by:
Hi VB fans I'm working on a relatively large project in VB6 with about a dozen forms, including graphs, labels, text boxes, etc. The software...
11
by: HolaGoogle | last post by:
hi all, can you please tell me what i should do to avoid session timeout when displaying my database info in my asp form...
7
by: Shanli RICHEZ | last post by:
I'm using ASP.NET and quite a lot of object in memory instead of a database. The question is that I tried to save the data, serialize them in a...
6
by: Josetta | last post by:
Access 2003 I've been experiencing some problems with my "monster" database the last couple of days. I imported all objects into a new database...
1
by: sajithamol | last post by:
Can we save Database Backup at our local system instead of at server machine?
5
by: dancer | last post by:
How do I send results of a form page to both email AND a database. I have a page which works with this sub: Sub btnSendMail_OnClick(Source As...
2
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project...
4
by: yuvang | last post by:
i have a mdb located in server and n number of users are accessing and adding data to that mdb (source table). now i want to save the mdb tables in...
0
by: ZIaee | last post by:
I have a project in c# and want to read from sql server data . I build report from data but when i run it can't access to server and first of all i...
3
HERBERTS
by: HERBERTS | last post by:
Some applications require the storing of report templates in a database. This simplifies template support - all reports are stored in one place, and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.