One way that edits are lost is to use the Close action at a time when the
record can't be saved.
If a record is partially filled out, but cannot be saved (e.g. a required
field missing), and you use the Close action/method, e.g.:
DoCmd.Close acForm, Me.Name
Access silently discards the edits and the user is not informed that their
record was not saved. (If the use the Close button built into the form's
title bar, they are informed.)
The RunCommand is applied to whatever form has focus at the time. There is
no guarantee that it is applied to the form you intend. A better solution is
to set the form's Dirty property to False, because you can then specify
which form this applies to, e.g.:
Me.Dirty = False
This generates a trappable error if the record cannot be saved.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Tim ffitch" <fi*@ifs.inchcape.co.uk> wrote in message
news:13**************************@posting.google.c om...
Here is my setup. 5 users on NT4 workstations each with front end
Access 97 db linked to NT4 server which has back end data file.
A user selects a supplier from a pop up form. The main form is updated
with the supplier details. The user then moves to a new order and then
later returns to the first order. The supplier details are no longer
there for the first order.
I have tried using docmd.RunCommand acCmdSaveRecord all over the place
to force the record to update to no avail.
Please, please, please has anybody got any ideas as to why the changes
are being lost. This does not happen all the time, only every now and
again.
Is it an access problem, NT4 workstation problem or NT4 Server
problem?
Many thanks for any advice you can offer.
Tim ffitch