Solved

MS Access How to update a radio button status with field name?

Posted on 2013-01-28
3
600 Views
Last Modified: 2013-01-30
I have a radio button that controls a field - press the button, field changes to "cancelled".

When I re-open this form, the field says cancelled, but the radio button isn't turned on.

How can I auto turn on the radio button if the field is already set to cancelled?
0
Comment
Question by:DJPr0
[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
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
nickinthooz earned 500 total points
ID: 38828340
If field.text = "cancelled" then
option.value= 1

In an option group, you check the value of the Option group control (MS
autonames this Frame if you don't assign a name). This will get the value
associated with checked item in the option group. If you want to force the
item to be checked you set the Option Group's value to one of the check box
control's option value.

If Me.YourFrame.Value = 1 Then
        MsgBox "Option 1 is selected"
    ElseIf Me.YourFrame.Value = 2 Then
        MsgBox "Option 2 is selected"
    End If

Open in new window


maybe that'll help.
0
 

Author Comment

by:DJPr0
ID: 38828356
Where do I input this code? Form - Load?
0
 
LVL 6

Assisted Solution

by:nickinthooz
nickinthooz earned 500 total points
ID: 38828426
I would guess, if you want the form to check it on load then yes.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

617 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