Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Working with Undo (Access 2000)

    Is there an event that runs when someone Undoes changes to a text box? I colour-code a text box on the After Update event, but if they then Undo the change the colour doesn't change back. Andy.

  2. #2
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Working with Undo (Access 2000)

    Unless you upgrade to Access 2002, the answer is no. Access 2002 (aka Access XP) added Undo events for Forms and specified controls, such as textboxes & combo boxes. In A2K you would have to create custom events to handle this, which can get a bit complicated.... For info on custom events, look up Event statement, RaiseEvent statement, & WithEvents keyword in VB Help.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Working with Undo (Access 2000)

    You could use a combination of the BeforeUpdate event and the tag property of the control to give you a handle on this. In the BeforeUpdate event, you can store the OldValue of the bound textbox in the tag and then reference it in the AfterUpdate event of the form to see if the current value of the control matches the stored value. If they do, reset the color to the default and clear the tag. You would also need to clear the tag in the Current event of the form to prevent carrying a tag value forward to another record.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •