Solved

Force Option Button to Selected

Posted on 2001-08-09
3
226 Views
Last Modified: 2012-06-21
I created an Option Frame and put Option Buttons on it - optFirst (OptionValue Property set to 1) and optSecond (OptionValue Property set to 2).
When the Form opens, the Option buttons are gray - none of them (especially the First one) is selected.
I tried
Me!optFirst.Value = True     (you can't set a value to this object)
Me!optFirst = True          (you can't set a value to this object)
Me!frOptFrame!optFirst.Value = True   (property Let procedure not defined...)


Help says I can set the Value of the Option Control

"Value Property - You can use the Value property to determine or specify if a control is selected, the selected value or option within the control, the text contained in a text box control, or the value of a custom property.
Check box, option button, and toggle button controls. Determines or specifies whether or not the control is selected."

BUT the example only shows how to read the value

"If Forms!Customers!Credit.Value = False Then"

but doesn't show how to SET it to true.

How do you force the first Option Button to be selected when the Form opens?
0
Comment
Question by:DavidWare
3 Comments
 
LVL 2

Expert Comment

by:hotbudare
Comment Utility
Option buttons within an option frame CANNOT have True/False values. The are, by default asigned an integer value, starting from 1. The value of the select option button becomes the value of the option frame.
If you want to give this option frame a value, use it's own DefaultValue and or Value properties.

HTH/EQTA
T.S.U. Mario Osorio
Punto Fijo, Falcon, Venezuela
0
 
LVL 3

Accepted Solution

by:
Co earned 50 total points
Comment Utility
Meaning that if you want to activate the first option:

Me!optFirst.OptionValue = 1

Me!frOptFrame.Value = 1

If you put this in your "on open" event on the form, the first option should be selected.

Hope this helps,

Co
0
 

Author Comment

by:DavidWare
Comment Utility
Thanks for the syntax.  OptionValue!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

744 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

10 Experts available now in Live!

Get 1:1 Help Now