Solved

Force Option Button to Selected

Posted on 2001-08-09
3
277 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
[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
3 Comments
 
LVL 2

Expert Comment

by:hotbudare
ID: 6371038
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
ID: 6371414
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
ID: 6371983
Thanks for the syntax.  OptionValue!
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

707 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