[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Force Option Button to Selected

Posted on 2001-08-09
3
Medium Priority
?
286 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 200 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

656 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