Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Saving data

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Saving data
Margaret Bartley 12.09.2006 20:19:02
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.
Re: Saving data
"Baz" <bazz[ at ]REMOVEbcap.THEeuro1net.CAPScom> 13.09.2006 12:46:06

"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).


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net