dialog box in access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my main form, I have a command button which runs a macro. The macro opens
a dialog box. The dialog box asks the user to provide information, and then
the macro uses that information to make additional decisions regarding the
record. Sometimes this results in changes to the value of a particular field
in the main form. The whole thing works OK, except that when I close the
dialog box, the changes have been stored to the underlying table, but they do
not update on the main form. When I try to close the main form, I get a
warning about "another user" changing the record. Apparently access sees the
macro as a different user than me. Is there some way to instruct access to
update the main form after the dialog box closes? I've tried "requery"
without success
 
Thank you for your advice. After closing the dialog box, if I manually
refresh the page, I get a write conflict warning. If I choose "drop changes"
then the main page updates as I wish. However, when I placed a "refresh"
command at the end of the macro to automatically update the main form after
the dialog box closed, it does not refresh properly. Oddly, if I refresh
manually, then change the data using the dialog box again, all runs well.
Apparently, the macro cannot refresh the main page the first time it is
invoked, but it does so perfectly on all subsequent uses, as long as I don't
close the main form in between. Why would this happen?
 
Back
Top