"Margaret Bartley" <Margaret Bartley[ at ]discussions.microsoft.com> wrote in message news:1AC4BED0-FA97-4103-80D4-323C367ACFD6[ at ]microsoft.com...
[Quoted Text] > I have a form that lists summary records. the user will double-click on
one > of those records to open the details for that record. > > The user then makes changes to the details, and clicks a button to return to > the summary list. > > The problem is that the changes just made by the user do not show up on the > summary list. > > The order of events for that command button are: > close the summary form > Open the summary form > Close the detail form (where the button is) > > The latest changes are not put into the database until the detail form is > closed, but that is after the summary form is opened. > > When I try to save the detail form before it is closed, I get errors saying > that the data has been changed since it was opned, and that is confusing to > the user. > > I'm not sure if I should try to track down why I can's save the data in the > form before closing it, or try to figure out how to update the summary form > before the detail form has been saved. > > In any event, I want a smooth transition, and I can't seem to make it happen. > > Any help would be appreciated.
I would do this by opening the detail form as a dialog box (i.e. with WindowMode:=acDialog). This will cause the code in the summary form to wait until the detail form is closed. Then, when the detail form closes, the code in the summary form resumes and requeries itself (Me.Requery).
|