UNDO for unbound control, NOTHING WORKS

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: rgrantz (rgrantz_at_hotmail.com)
Date: 03/21/05


Date: Sun, 20 Mar 2005 16:14:52 -0800

I have an unbound form in which users input the Start Date and End Date to
use for reports that open based on the button clicked. When the user enters
a date syntax wrong (ie. 1//2/03), it seems the place to capture the 2113
(invalid entry) error is in the form's OnError event, NOT the control's
BeforeUpdate event. I am able to trap and show my own msgbox, but cannot
for the life of me undo the text entered in the date field. None of the
following works after the dataerr = 2113 check:

cancel = true
me.undo
me.controlname.undo
me.controlname = ""
me.controlname.text = ""
me.controlname.value = ""
me.controlname = null

All the posts I've seen on undoing unbound control entry say to use
me.controlname.undo, but this does nothing. The Esc key works, and I've
seen that me.undo is supposed to duplicate the pressing of the Esc key, but
it isn't.

I not only want to undo the entry so the user has to re-enter, but also
because I need them to be able to press my "cancel report and return to main
menu" button. They can't leave the form if they entered an invalid date
syntax until they use the Esc key to undo their entry.

I apologize for the extreme newbieness of this post, but I'm at my wit's end
here.

Any help is greatly appreciated, and thanks.



Relevant Pages

  • Re: UNDO for unbound control, NOTHING WORKS
    ... If it is an unbound form, there is no record to save the Start Date and End ... > (invalid entry) error is in the form's OnError event, ... > for the life of me undo the text entered in the date field. ... The Esc key works, and I've ...
    (microsoft.public.access.formscoding)
  • Re: Total of choice two
    ... Each Entry is a single observation. ... I have a series of reports that return ... By seeing the number of incorrect components per entry, ... >> Vanderghast, Access MVP ...
    (microsoft.public.access.queries)
  • Outlook calling CompareEntryId a lot after calling GetHierarchyTable
    ... symbol beside a folder in the folder view pane. ... |- 2002 Reports ... Compare entry Id for folder "2002 Reports" against entry Id for folder ...
    (microsoft.public.win32.programmer.messaging)
  • Re: UNDO for unbound control, NOTHING WORKS
    ... >but cannot for the life of me undo the text entered in the date field. ... > All the posts I've seen on undoing unbound control entry say to use ... The Esc key works, and I've ...
    (microsoft.public.access.formscoding)
  • Re: [linux-usb-devel] Re: Linux 2.6.x wrongly recognizes USB 2.0 DVD writer
    ... > working by removing the checks from the writing tool. ... > whereas 2.4.27 correctly reports ... > I have not yet tested after removing this entry, ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)