Solved

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

Posted on 2013-01-28
3
550 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
  • 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

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

910 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

16 Experts available now in Live!

Get 1:1 Help Now