473,320 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Option button value

I have created my option buttons and they're in a nice group and all, but I can't figure out how to read the values I choose there. Every single Access help page only tells how to create the buttons.

Anyhow, the purpose is selecting how to deal with duplicate records on creation. I have four options. The form is named popSaveOptions and the frame is SaveOptions. Can anyone give me steps to getting back the user selection value?
Aug 2 '11 #1
3 10312
nico5038
3,080 Expert 2GB
The frame will hold the selected value, so in your case "Me.SaveOptions".
In the properties window you could bind the frame to a record field of the form.

Nic;o)
Aug 3 '11 #2
NeoPa
32,556 Expert Mod 16PB
As Nico says, the Value of Me.SaveOptions will reflect the current selection. The individual Option controls (the radio buttons themselves) will also reflect their True/False status individually in case that helps.
Aug 4 '11 #3
ADezii
8,834 Expert 8TB
@David:
This would be an ideal candidate for the Select Case...End Select Structure. In your specific case, it could look like:
Expand|Select|Wrap|Line Numbers
  1. Dim grp As OptionGroup
  2.  
  3. Set grp = Me![SaveOptions]
  4.  
  5. If IsNull(grp) Then
  6.   MsgBox "You must select 1 of the 4 Options before you can proceed!"
  7.     Exit Sub
  8. End If
  9.  
  10. Select Case grp
  11.   Case 1
  12.     MsgBox "You chose Option 1"
  13.   Case 2
  14.     MsgBox "You chose Option 2"
  15.   Case 3
  16.     MsgBox "You chose Option 3"
  17.   Case 4
  18.     MsgBox "You chose Option 4"
  19.   Case Else
  20.     'Will never happen with 4 Options unless you change the
  21.     'Option Value of any Radio Button
  22. End Select
Aug 4 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Steve Leferve | last post by:
Hey folks - I have a set of radio-button option objects in a frame on a form. I want to enable a combo box when one of them is selected. Which event is the proper time to see whether or not the...
3
by: Andy K | last post by:
Hello everyone, I have a form with an option button on it. I am having problems to set the value of this to is previous state/selection. For instance if someone navigates from the main menu to...
1
by: Mark | last post by:
Hi All, Is there anyway I can select an option button by clicking a command button? From what I have found out so far, unlike a check box, and option button has no value so I can't assign it one....
1
by: Stephen D Cook | last post by:
What I am trying to do is have a set of option buttons which are required to click one. If the person doesn't click any before insert, they get an error. If they do click one, it inserts into the...
1
by: Stephen D Cook | last post by:
In my form I have an option group with 3 option buttons. My form is tied to a table. the options are Temp, Permanent and Overtime. I have these inside a frame. I have an AddRecord button to enter...
6
by: ducky | last post by:
I have set up two option buttons. When option button 1 is selected I need to make sure that the combo box located beside Option button 2 is cleared. In turn I need to make sure that if a value is...
0
by: Ample | last post by:
This is what I'm trying to do. I created a form for a user to enter a name. The information is saved in SQL DB employees table. The employees table auto number is assign to global variable GBL_ID as...
13
by: alive84 | last post by:
Hi there, I have a two problems concerning option button values on a report and data report creator reports. The situation: I have three option value boxes two have 3 option and one has...
3
by: deepikashalini | last post by:
Hi, how can i getting the selected option button value and pass to function.reply soon....
3
by: ladycyradis | last post by:
Hi, I'm new here and have a bit of a problem. I'm building a form in Access 2003 and have a piece of code I'm using to ensure that the correct values are saved in the table when each option is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.