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
241 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
  • 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
 

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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now