473,385 Members | 1,876 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,385 software developers and data experts.

Updating a record from Access to an SQL 2005 database

I have an access form that connects to a database on a main server.
These forms stay open for a long length of time (a couple hours) and
then the user finishes with them and closes the form. The problem
that has been occurring is that sometimes for whatever reason the
connection to the server is broken and when the sheet is closed the
data is trying to commit to the database and can't. Is there a
setting to commit data to the database as soon as it is entered into a
field and not when the full record is closed/committed? Or is there
any other way to protect myself from this lose of data?

Jul 19 '07 #1
1 1225
pyrahna <pl*******@gmail.comwrote:
>I have an access form that connects to a database on a main server.
These forms stay open for a long length of time (a couple hours) and
then the user finishes with them and closes the form. The problem
that has been occurring is that sometimes for whatever reason the
connection to the server is broken and when the sheet is closed the
data is trying to commit to the database and can't. Is there a
setting to commit data to the database as soon as it is entered into a
field and not when the full record is closed/committed? Or is there
any other way to protect myself from this lose of data?
You could put the following code in behind every control on the form.

if me.dirty then docmd.runcommand accmdsaverecord.

thus saving the record after the user exits from each control. A bit inefficient if
they are going through a large number of fields rapidly.

Alternatively you could use a timer event and after x seconds of inactivity save the
record.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Jul 19 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
1
by: Spock | last post by:
Hi. I have a form with a listbox and a few label fields all bound to a dataset. When i navigate the listbox the labels change accordingly. so far everything works good. I made a button to...
6
by: Fred Geurtsen | last post by:
Question about updating a access Database Record! Normally i'm working with SQLserver, but i have to do this with access and it's not working. My error is: Operation must use an updateable query....
2
by: barret bonden | last post by:
(closest newsgroup I could find) Error Type: ADODB.Recordset (0x800A0CB3) Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype....
5
by: Hexman | last post by:
I've come up with an error which the solution eludes me. I get the error: >An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in HRTest.exe > >Additional...
11
by: bbasberg | last post by:
Hello, I have been struggling with this problem for DAYS and have googled my heart out as well as reading any books I could get my hands on but I cannot find any specific references to my problem....
0
by: wildlifecanada | last post by:
I'm fairly green to this web developer thing, especially when it come to data access, so forgive my ignorance. I've made a web page using Web Developer Express (2005). I've got it hooked up to...
0
by: C-Note | last post by:
This is a simple MS Access 2003 Project file (*.adp). It accesses a SQL Server 2005 database on the network. It has 10 tables. Everything updates, deletes, inserts, adds without a hitch, except...
4
by: MooVBuff | last post by:
I am new to VB.2005 and to make it worse, I'm switching over from VB 6.0. I have figured out how to programmatically Create a Database and Table and how to add data to an Access database (Two weeks...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.