469,641 Members | 1,534 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,641 developers. It's quick & easy.

MS Access 97 - Forcing an Update

Environment: MS Access 97

Trying to force a record to update using the recordset.Update
property. What syntax do I need to force a record to be updated? I
have searched the newsgroups and web and haven't found a solution that


The following is the syntax from the help file:
recordset.Update (type, force )

The Update method syntax has the following parts.

Recordset: An object variable that represents an open, updatable
Recordset object.

Type: Optional. A constant indicating the type of update, as specified
in Settings (ODBCDirect workspaces only).

Force: Optional. A Boolean value indicating whether or not to force
the changes into the database, regardless of whether the underlying
data has been changed by another user since the AddNew, Delete, or
Edit call. If True, the changes are forced and changes made by other
users are simply overwritten. If False (default), changes made by
another user while the update is pending will cause the update to fail
for those changes that are in conflict. No error occurs, but the
BatchCollisionCount and BatchCollisions properties will indicate the
number of conflicts and the rows affected by conflicts, respectively
(ODBCDirect workspaces only).
Nov 12 '05 #1
1 6731
The use of recordset.Update refers to when you create a reocrdset in code,
and thus need to do a update.

The above concept has nothing to do with a form bound to a table, as then
you are not manipulating the data via reocrdsets, but are just using forms.

It is not all clear in which context you are referring to updating a record.
(as there is a zillion ways to update records).

If you want in code to force a disk write for a form that is bound to a
table, and not talking about a reocrdset, then you can use:

In the forms code. Since I always restrict my forms to generally one record,
then out of convenience, I use the above syntax. However, many of the more
experienced regulars here do suggest to use:

if me.Dirty = True then
me.Dirty = False
end if

The dirty property is set = true if data has been modified. If you force
dirty = false, then the only thing ms-access can do is to first force a disk
write. Me.Refresh also works, but can cause other records to be loaded
again. Either of the above will force the current record in a bound form to

If you are talking about recordsets, and code, then your example of using
recordset.update is correct.
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Robert Wille | last post: by
1 post views Thread by Robert Wille | last post: by
6 posts views Thread by Plamen Doykov | last post: by
12 posts views Thread by Hugh Welford | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.