View Single Post
  #52  
Old January 20th, 2010, 09:35 PM posted to microsoft.public.access,microsoft.public.access.formscoding
Armen Stein[_2_]
external usenet poster
 
Posts: 157
Default trying to minimize Write Conflicts in a multi-user database

On Tue, 19 Jan 2010 22:11:17 -0800, "Paul" wrote:

if you're updating a record in a different subform, save any edits to the
first subform before navigating to the other subform. This is the only way
to avoid write conflicts


That's something else I'm not doing. I just assumed that when you leave a
subform, the record would be saved automatically. Are you saying that you
need to write a line of code to save a record when you click another tab or
close the form?


Paul, your assumption is correct. When your focus moves between a
main form and subform, or from one subform to another subform on the
same main form, Access implicitly saves the dirty record of the form
you are leaving. In other words, within a main form and its subforms,
only one record can be dirty at a time. No code extra code is needed
for this.

However, the explicit save *is* necessary if your focus is not leaving
the form, but running an update operation in code on the same records
as that form.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com