473,836 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to save the database in vba?

5 New Member
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
8 12753
Mihail
759 Contributor
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
plynius schull
5 New Member
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 Contributor
Copy the file then rename it as you wish.
Jan 23 '12 #4
NeoPa
32,584 Recognized Expert Moderator MVP
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 Recognized Expert Specialist
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 Recognized Expert Moderator Top Contributor
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 Contributor
Good to know, Smiley !
Jan 24 '12 #8
plynius schull
5 New Member
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
25034
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 less complex technical calculations, several input variables. I would like to equipp the starting panel with the usual New, Open, Save, Save As, Close etc. menus (like in Excel, or Word, etc.) What is the best way to accomplish Save, or Save As?...
11
3590
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 database randomly....otherwise it's always runs into a session time out.... **Also when i save new account info (You'll notice that i've been asked to put a save button near each record...so, it's not one global save it's by record), i'd like to be...
7
1274
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 ending. event : Application_End in Global.asax. But the object are not accesible from there so I can't save them. Any idea ???
6
4145
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 problems, but here's something weird: Whenever I copy an object (reports so far), I am able to open it and make changes, but when I try to save it (without closing), it appears to save (message box goes off), but it doesn't. Then, if I try to...
1
1168
by: sajithamol | last post by:
Can we save Database Backup at our local system instead of at server machine?
5
1312
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 works with this sub: Sub btnSendDatabase_OnClick(Source As Object, E As EventArgs) How do I combine the two? I tried putting the second sub within the first,
2
3586
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 uby/Rails. I started it in Perl and gave up on Perl as I went from the 'display the database information on the web page' to the 're-display the information from the database and allow the user to update the database using the web page' stage and realized...
4
2290
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
1097
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 password. Well how can i save this information and when i want have report bind it automaticaly to report?
3
15476
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 different templates. I noted only one shortcoming of this technique - slight complication of the code in the client application. For example, we need to create Access database (mdb) named "reports" and a table for storing our report templates. I named...
0
9813
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9665
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10834
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10584
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5645
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4446
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3108
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.