473,499 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I reset the Option Group back to Null after opening new form?

269 Contributor
I am using a set of options groups with some code that puts the text (rather than the typical 1,2,3, etc) into the table. I got the directions from this post:
http://bytes.com/topic/access/answer...oup-value-text

Here is MY code:
Expand|Select|Wrap|Line Numbers
  1. Private Sub FrameSeries1_AfterUpdate()
  2.  
  3.  Select Case Me![FrameSeries1]
  4.     Case 1
  5.       Me![txtSeries1] = "Odd"
  6.     Case 2
  7.       Me![txtSeries1] = "Even"
  8.     Case 3
  9.       Me![txtSeries1] = "All"
  10.     End Select
  11.   End Sub
  12.  
  13. Private Sub FrameSeries2_AfterUpdate()
  14.  
  15.  Select Case Me![FrameSeries2]
  16.     Case 1
  17.       Me![txtSeries2] = "Odd"
  18.     Case 2
  19.       Me![txtSeries2] = "Even"
  20.     Case 3
  21.       Me![txtSeries2] = "All"
  22.  
  23.   End Select
  24.  
  25. End Sub
  26.  
  27. Private Sub FrameSeries3_AfterUpdate()
  28.  
  29.  Select Case Me![FrameSeries3]
  30.     Case 1
  31.       Me![txtSeries3] = "Odd"
  32.     Case 2
  33.       Me![txtSeries3] = "Even"
  34.     Case 3
  35.       Me![txtSeries3] = "All"
  36.  
  37.   End Select
  38. End Sub
  39.  
  40. Private Sub FrameSeries4_AfterUpdate()
  41.  
  42.  Select Case Me![FrameSeries4]
  43.     Case 1
  44.       Me![txtSeries4] = "Odd"
  45.     Case 2
  46.       Me![txtSeries4] = "Even"
  47.     Case 3
  48.       Me![txtSeries4] = "All"
  49.  
  50.   End Select
  51. End Sub
  52.  
However, when I open the form and select options on the first entry, those options follow me around (remained clicked) when I go to the next form (either already with data OR a new form).

To be clear, as I scroll through I would want the forms already filled out to remain with the options that were selected at their time of entry. I would want the options on new forms returned to null. I already have the default of both my options groups AND my text boxes (txtSeriesX) set to Null. This doesn't seem to work.

Can anyone offer any advice?

**Update: I wanted to report that I made my text boxes visible and the input data IS staying with the appropriate records. However when the database goes live the textboxes won't be visible (as this would confuse the user). So keeping the radio buttons to align with the text boxes that are storing the text value of the radio button would be helpful. And the problem of them not defaulting to Null on a new record still exists.

Thanks, Danica
Apr 9 '14 #1
3 1830
NeoPa
32,557 Recognized Expert Moderator MVP
Don't store the text value. Display it as text when you must, but always store the numeric value only.

If I understand you correctly (and I'm not positive I do) then that should resolve your problems.
Apr 10 '14 #2
DanicaDear
269 Contributor
NeoPa, I took your advice here and stored the numeric value only. And it did solve my problem.

As you know, I scrounge around the web to find ways do all my "tricks" in Access. This has created a new question that I think is simple, but I have looked for 8 hours on the internet still with no solution. Time to "Ask a(nother) Question" on Bytes!! :-)
One day, I hope I Rest in Peace. hahaha
Apr 17 '14 #3
NeoPa
32,557 Recognized Expert Moderator MVP
"One day, I hope I Rest in Peace. hahaha" - Danica.

I sincerely hope that day doesn't come too soon Danica. We'd all miss you.
Apr 17 '14 #4

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

Similar topics

2
2329
by: Steve | last post by:
Access 97. I have a form where there is an option group with two buttons, and a combo box. The combo box Row Source is a query. The option group has two options a) include a subset of the...
2
4820
by: Charles | last post by:
Ok, so I'm creating a form on the fly. I can create the option group, I can create the checkboxes, but I can't figure out how to bind them to the option group I'm creating them within. I was...
9
1710
by: jeremy0028 | last post by:
I have a option group M F and is stored into a field called gender. I also have a 2 text boxes on a form one called male one called female What i want to do is when the user select m from the...
1
2057
by: Moe | last post by:
Hi, this my first post to this group. I am trying to add a option group of ture/false and all. This is on a form, that the results are displayed in a subform. When the user select a record from...
1
2313
by: allansiu823 | last post by:
I am developing this computer/monitor inventory database and I want to see if a monitor is connected to a computer. I have two tables, namely "Computer" and "Monitor", and they are related by the...
1
1676
by: EORTIZ | last post by:
I need to be able to delete a selection from an option group control in a form. In other words, if I selected value 1 from the option group control and I should have left blank this control.
2
4500
tuxalot
by: tuxalot | last post by:
New to Access so please go easy. I have a form with an option group. I've wish to have it's result display on my report. options a, b, c I've created a field in my table to accept the data...
21
6534
jinalpatel
by: jinalpatel | last post by:
I have three option buttons (1 option group): construction projects, non construction projects and aquisition projects. I have created a form with more than 35 data entry fields for each of this...
4
2337
luvgis
by: luvgis | last post by:
I have an Access form to be used for data entry of returned bus surveys. The survey consists of 15 questions and several of the questions will be options groups in the form. For example, question 1...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7386
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3098
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.