"John S. Ford, MD" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Yes but then I'd have to depend on my user knowing that. Isn't there a
> way of doing this programmatically via a command button?
>
> I know that with VB.net, you can set a button's CausesValidation = False
> to prevent a validation routine from occurring in a TextBox elsewhere.
> This is typically used with programmer-created "Undo", "Cancel", or "Help"
> buttons. Is there no comparable property in VBA?
>
Unfortunately we don't have that feature.
However, I not 100% sure if we had the causesVAlidation feature that would
really fix this problem.
Unless you are going to allow the focus to move away from that control then
you can't run the code to do the undo.
The standard windows way is to use the menu bar and go
edit->undo
This works in word, excel, access etc. So, it is very much standard option
in applications that your users will have been exposed to.
I usually build custom menu bars for my applications, and this again solves
the above problem. It also means that you can hide all of the ms-access
interface without have to run special code to hide things.
There is some nice screen shots of access menus in the following link:
I talk about the approach I use to build menu bars here:
http://www.members.shaw.ca/AlbertKal...erFriendly.htm
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)