Re: Confirm data change on close
- From: Klatuu <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 4 Jan 2008 09:22:02 -0800
You are correct. closing the form or the application will save any changes.
There is no real good reason to use a save button. It is just that some
people are afraid they will save data they don't want to save.
--
Dave Hargis, Microsoft Access MVP
"raylopez99" wrote:
On Jan 4, 10:35 am, Klatuu <Kla...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
For your save button:
If Me.Dirty Then
Me.Dirty = False
End If
For your Exit Button, just use Docmd.Close in the click event. Put the code
to check for changes in the Form's Unload event. That way, if the user
closes the form either using the exit button or by some other means, it will
stilll do the check.
Put this in the Form Unload event:
Very interesting thread but I have a newbie question--I understand the
principle behind Save in Windows, but in Access it seems that clicking
on the red "X" in the upper right corner always saves the record
automatically. That is, for any form I've worked with to date (about
2 weeks of VB programming to be sure), it seems (maybe I'm wrong) that
no data has ever been lost this way (by simply closing the form as
described above).
In short, why bother with "save"--it's it the default to save
everything if a form/control is dirty?
There is no real good reason to do this. It is just that some people are
afraid they will save data they don't want to save.
.
RL
- References:
- RE: Confirm data change on close
- From: Travis (New User)
- RE: Confirm data change on close
- From: Klatuu
- Re: Confirm data change on close
- From: raylopez99
- RE: Confirm data change on close
- Prev by Date: Re: Confirm data change on close
- Next by Date: Re: Retrieve the records based on the time range
- Previous by thread: Re: Confirm data change on close
- Next by thread: RE: Using VBA to limit the values in a combo box
- Index(es):
Relevant Pages
|