Results 1 to 3 of 3
  1. #1
    twgonder is offline Expert
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658

    Place undo / redo on form as some kind of control?

    I was just adding two buttons to my form header for undo / redo and realized this is probably much more than a button,


    It's more like an underlying control.
    Can I add what is in the upper circle thingy (highly technical terms here) to where I have Undo?

    Click image for larger version. 

Name:	220805Undo.jpg 
Views:	9 
Size:	78.1 KB 
ID:	48457

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    Depends on what Undo you are expecting it to do.

    Once a record is saved, it is saved so you cannot discard changes after that.

    But you might be able to code for it - investigate using the begintrans/committrans functions. Alternatively bind your form to a temporary table(s) and have a button to append to the appropriate tables once done. Another method is to use disconnected ADO recordsets - but be aware forms are coded to work with DAO so the default sort/filter won't work and will generate an error, so either disable or write your own routines.

    Don't know about form layout if you have code modifying that. My approach is to have a function that sets out the form depending on conditions - say the form back colour changes and some controls are hidden/disabled/whatever.

    It is then called in the form open or current event (depending on requirement) as well as whenever the user makes a choice which impacts the look of the form (such as clicking a button, making a selection from combo or listbox)

    This would probably solve your problem in your other thread as the function would set a 'default' view when the form is opened.

  3. #3
    twgonder is offline Expert
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658

    Oooops, I've got plan for you thinking bigger than me

    Quote Originally Posted by CJ_London View Post
    Depends on what Undo you are expecting it to do.

    Once a record is saved, it is saved so you cannot discard changes after that.
    ...
    Don't know about form layout if you have code modifying that. My approach is to have a function that sets out the form depending on conditions - say the form back colour changes and some controls are hidden/disabled/whatever.

    It is then called in the form open or current event (depending on requirement) as well as whenever the user makes a choice which impacts the look of the form (such as clicking a button, making a selection from combo or listbox)

    This would probably solve your problem in your other thread as the function would set a 'default' view when the form is opened.
    I was wanting it to do exactly the same thing the upper left arrow does (quick toolbar) in a form. In other words, it's right there for the user if I lock down what Access displays as far as tool bars go.

    I've been using sub to do all my conditions when changing a form, the subs often go three levels deep, one for the form procedure, one for an generic forms or report module, and one for super generic that covers forms and reports (like changing those codes for color in Access to something VBA can use).
    Last edited by twgonder; 08-06-2022 at 03:33 PM.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. control undo
    By markjkubicki in forum Programming
    Replies: 3
    Last Post: 08-18-2021, 12:43 AM
  2. Replies: 4
    Last Post: 11-24-2020, 03:41 PM
  3. Where to place this control?
    By Lou_Reed in forum Access
    Replies: 4
    Last Post: 10-16-2017, 01:16 PM
  4. Replies: 2
    Last Post: 08-22-2013, 09:12 AM
  5. Replies: 7
    Last Post: 07-15-2011, 08:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums