Results 1 to 5 of 5
  1. #1
    smith.jr is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2014
    Posts
    9

    I don’t want the option buttons to reset each time the form is opened

    I have a form with several command buttons to run different reports. I’ve added two option buttons in an option group on the form, so the user can choose to either preview the reports before printing or send the reports straight to the printer. The option buttons are not bound to anything, they are just used to preview the reports or print the reports.

    When the form is opened, I would like the option buttons to “default” to what was selected when the form or database was closed. I don’t want the option buttons to reset each time the form is opened.

    Thanks in advance for your help.

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The only way to do that is to save the values. The simplest way to do that is to bind the form/controls to a one-record table in the front end.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    smith.jr is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2014
    Posts
    9
    Thanks Paul. I had not thought of it that way, but will try. Do you think there is a way to use an "on close" event to set the value for the option group?

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Sure, you just set the value of the frame.

    Me.FrameName = 1
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    But there, again, it would have to be Bound to a Field in a Table...as Paul suggested.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 3
    Last Post: 07-22-2017, 12:03 PM
  2. Replies: 20
    Last Post: 06-22-2017, 10:36 AM
  3. Replies: 6
    Last Post: 05-09-2014, 09:03 AM
  4. Text appearing every time form is opened.
    By lmjje in forum Programming
    Replies: 2
    Last Post: 01-04-2013, 09:25 AM
  5. Buttons to add, substract and reset values
    By squashedmos in forum Forms
    Replies: 4
    Last Post: 03-10-2012, 01:11 PM

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