Re: Messages at form closing?
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Wed, 8 Jun 2005 09:31:06 +0800
Yes, the default in Access is to save the record when you close the form,
move to a different record, filter the form, sort the form, and so on.
And it's a *really* good idea that Access notifies you if your entry was not
saved. Personally, if I found that I had bought a piece of software that
sometimes just silently lost whatever I entered with no notification at all,
I would refuse to use the software and ask for my money back.
It is possible to suppress those messages using a combination of the Error
event of the form and the BeforeUpdate event of the form. But are you sure
you want to just throw away people's entry and leave them with the belief
that "I entered it, but your program loses it!"
--
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.
"Rodi" <Rodi@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:349E69F2-7370-4AA3-8223-871D32CF4A2F@xxxxxxxxxxxxxxxx
>
> I've a form with some subforms. One one of the subforms is a command
> button
> that updates the subform table record. This all works fine, however, when
> I
> "X" to close the subform, I get the two-headed message monster of:
>
> " The changes you requested to the table were not successful because they
> would create duplicate calues in the index, primary key, or relationship.
> Change the data in the field or fields that contain the duplicate data,
> remove the index, or redefine the index to permit duplicate entries and
> try
> again."
>
> and:
>
> "You can't save this record at this time. Do you want to close the
> database
> object anyway?"
>
> So, it seems the default of the "X" button is to update the table by
> creating a new record? Is there any way around this behavior or messages?
> I
> tried putting "DoCmd.SetWarnings False" in the BeforeUpdate event of the
> subform, but that didn't help.
>
> Thanks,
> Rodi
.
- Follow-Ups:
- Re: Messages at form closing?
- From: Rodi
- Re: Messages at form closing?
- References:
- Messages at form closing?
- From: Rodi
- Messages at form closing?
- Prev by Date: Re: Out of Stack Space Error 28
- Next by Date: Problem with Date code syntax
- Previous by thread: Messages at form closing?
- Next by thread: Re: Messages at form closing?
- Index(es):
Loading