PC Review


Reply
Thread Tools Rate Thread

Best way to facilitate user's cancel?

 
 
LAS
Guest
Posts: n/a
 
      7th Aug 2010
Since Access doesn't require an explicity save when records are created or
modified in a form, what is the best way to allow the user to undo what they
have done before leaving a record?

tia
las


 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      7th Aug 2010
On Fri, 6 Aug 2010 23:28:46 -0400, "LAS" <(E-Mail Removed)> wrote:

>Since Access doesn't require an explicity save when records are created or
>modified in a form, what is the best way to allow the user to undo what they
>have done before leaving a record?
>
>tia
>las
>


1. Teach them that hitting <Esc> twice will cancel the edit.
2. Put a command button on the form which executes a Me.Undo action.
3. (worst choice IMO since users will just click OK anyway) Put code in the
Form's BeforeUpdate event to make them verify that they want to save:

Private Sub Form_BeforeUpdate(Cancel as Integer)
Dim iAns As Integer
iAns = MsgBox("Okay to save?", vbOkCancel)
If iAns = vbCancel Then
Cancel = True
Me.Undo
End If
End Sub
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/For...-US/accessdev/
http://social.answers.microsoft.com/.../en-US/addbuz/
and see also http://www.utteraccess.com
 
Reply With Quote
 
ManningFan
Guest
Posts: n/a
 
      11th Aug 2010
I always get flamed by a few ... ahem... "MVPs" when I say this, but
an unbound form with an "Update" button is the easiest way. The
record isn't saved until the user clicks the Update button, so even if
they just close the screen it's not going to cause problems.
 
Reply With Quote
 
Access Developer
Guest
Posts: n/a
 
      12th Aug 2010
"ManningFan" <(E-Mail Removed)> wrote

> I always get flamed by a few ... ahem... "MVPs"
> when I say this, but an unbound form with an
> "Update" button is the easiest way. The record
> isn't saved until the user clicks the Update
> button, so even if they just close the screen
> it's not going to cause problems.


ManningFan, you've never been _flamed_ in these newgroups. You have only
been corrected for giving the bad advice of using unbound forms. My guess
is, as long as you feel compelled to offer bad advice to people asking
questions here, someone will respond to your post to indicate that it is bad
advice.

I observed flaming at the feet of the Flamemistresses and Flamemeisters in
the WRITING echo of the old FidoNet hobbyist network when the web was just
in its infancy. A well-constructed flame by someone who makes his or her
living with words is, like a thing of beauty, a joy forever. It will leave
the flamee shriveled and bent like the matchsticks used in old cartoon
reruns to indicate burnout. I've never seen any response to your posts that
came even close.

The OP will be well-advised to invest the time and effort to learn "The
Access Way". Once he groks how Access works, it will be trivially easy to
prevent an unintended update _and_ he won't be relying on his own code and
testing instead of the code that has been working in Access since 1993 and
tested in the real world by millions of users, billions (maybe trillions) of
times. It is advice that I will not bother to offer to you, yet another
time, as you have rejected it enough already.

Larry Linson, Microsoft Office Access MVP
Co-author: "Microsoft Access Small Business Solutions", published by Wiley
Access newsgroup support is alive and well in USENET
comp.databases.ms-access
Even the formerly-Microsoft-sponsored newsgroups are still around in most
news servers



 
Reply With Quote
 
ManningFan
Guest
Posts: n/a
 
      12th Aug 2010
On Aug 12, 1:14*am, "Access Developer" <accde...@gmail.com> wrote:
>
> I observed flaming at the feet of the Flamemistresses and Flamemeisters in
> the WRITING echo of the old FidoNet hobbyist network when the web was just
> in its infancy.


You should have been a Jethro Tull fan and seen the work of one
"Wilburn" 10 or so years back. That guy was so good he literally
killed the newsgroup. Actually he was more troll than flamemeister,
but he used to rip a few people in particular.

That being said, I still contend that sometimes Microsoft IS wrong,
and the "Access Way" is more of a pain in the arse than is necessary.
You say tomato, I say tomahto, but either way it tastes the same.
 
Reply With Quote
 
Access Developer
Guest
Posts: n/a
 
      13th Aug 2010
"ManningFan" <(E-Mail Removed)> wrote

> That being said, I still contend that sometimes
> Microsoft IS wrong,


Yes, you are correct that Microsoft is sometimes wrong.

> and the "Access Way" is more of a pain in
> the arse than is necessary.


But, about this, it is you that are wrong.

If you insist on using unbound forms there's little, if any, advantage to
using Access instead of Classic VB (6.0 and earlier). Even with unbound
forms, I will admit that Access has the advantage over the world of DotNet.

> You say tomato, I say tomahto, but either way it tastes the same.


Wait, aren't you thinking of our newsgroup colleague, Salad?



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cancel Macro is user selects 'cancel' at save menu =?Utf-8?B?TWFyaw==?= Microsoft Excel Programming 1 6th Apr 2005 05:45 PM
facilitate data insertion =?Utf-8?B?YW5naWU=?= Microsoft Access Forms 3 14th Nov 2004 10:29 AM
facilitate data insertion =?Utf-8?B?YW5naWU=?= Microsoft Access Form Coding 2 27th Oct 2004 12:10 AM
Re: How to force logoff to facilitate Tony Toews Microsoft Access 0 5th Sep 2003 04:45 AM
Re: How to force logoff to facilitate Arvin Meyer Microsoft Access 0 5th Sep 2003 02:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:29 AM.