Solved

MS ACCESS:  Want to get Option Group to stop always opening the last selected option 1st instead of the user selected option

Posted on 2014-10-02
9
255 Views
Last Modified: 2014-10-06
I have an "Option Group", wizard created without a default selection, that has this unwanted quirk where it launches the pre-close, last selected option, instead of the user selected option, even though the user selected an alternative option.   When the user exits the unwanted option, the user is then free to satisfactorily select the option(s) desired.
There are 7 options, each launching a 'built' macro that opens a specific Query.
0
Comment
Question by:willjx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 28

Expert Comment

by:omgang
ID: 40358298
Post the code for the AfterUpdate event of the Option Group.
OM Gang
0
 

Author Comment

by:willjx
ID: 40358337
I know not of what you speak.
I am aware of "the AfterUpdate event of the Option Group".  However, I do not "code", and prefer not to code.
0
 
LVL 28

Expert Comment

by:omgang
ID: 40358391
The Wizard would have coded this for you.  In the properties box for the Option Group, double-click the AfterUpdate event to open the code window.
OM Gang
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:willjx
ID: 40358462
I  "double-clicked the AfterUpdate event to open the code window", and all it did was toggle between Mprogram and EventProcdedure with no apparent Wizard coding.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 40358664
Upload a sample database after removing all objects unrelated to this issue.
Explain what to do to demonstrate the problem.
0
 
LVL 84
ID: 40359131
If you goal is to just launch a query when the user clicks one of the Radio buttons, then I'm not sure you need an Option Group for that. Option Groups are used for "One and Only One" type of selections. like Gender.  Try removing the option buttons from the group (but leave the macros attached) and see if that solves your issue.

To remove them from the group, highlight the Radio button and it's label, and then press Ctrl-X. Then, click on the Detail section and press Ctrl-C.
0
 

Author Comment

by:willjx
ID: 40360612
Scott--Appears to be a better solution.  I did your recommendation:
"..highlight the Radio button(s) and it's label(s), and then press Ctrl-X. Then, click on the Detail section and press Ctrl-V".
Properties auto-showed: "On Got Focus" with the correct embedded macro.
Clicking on the button evoked the appropriate macro/Query.
However, it will not allow me to close the Query, so I can select another button.
  Clicking on the top right cnr, X or right-button clicking 'Close' does nothing.
What do I need to add?
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40361111
Properties auto-showed: "On Got Focus" with the correct embedded macro.
You should run that on the Click event of that control, otherwise if your user tabs through the controls, they'll launch each of them, and that's probably not what you want. Also, in my opinion Radio Buttons are poor choice for this sort of process, as they're generally used to indicate a setting, or a selection of one or more items. A better control for this would probably be a Command Button - but that's up to you.

If you can't close the query, then you've got troubles with the database, or troubles with Access. Before doing any of these suggestions, be sure to backup your database.

1.Compact the database.
2. Compile the database - from the VBA Window, click Debug - Compile. Fix any errors you find, and continue doing this until the menu item is disabled.
3. Compact again.

Sometimes you have to Decompile the database. To do that, create a shortcut with a Target like this:

"full path to msaccess.exe" "full path to your db" /decompile

Run that, then run the 3 steps above again.

You may also need to create a new, blank database and import everything to there. Create the database, then use External Data - Import to locate your old database. Select all objects, and click Import. After you've done that, complete the 3 steps above again.

Finally - be sure your Office and Windows installations are fully up to date, with all Service Packs, and all relevant Hot Fixes installed.
0
 

Author Closing Comment

by:willjx
ID: 40364883
Thanks.  Could not find anything wrong with the DB.
Took your suggestion to just use "Command" buttons in place of 'Options', and all is well
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question