473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 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 12651
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,556 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 itself is actually a flow simulator with more or...
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 (DisplayUserDatabase.asp)??? ** actualy it does load and display the...
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 XML file to save them when the application is...
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 yesterday, which pretty much stopped the crashing...
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 Object, E As EventArgs) And I have a page which...
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 at home, I'm writing a ham radio web site in...
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 particular time interval frequently.
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 must input server name,database name,user id and...
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 allows to differentiate the access rights to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.