473,508 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to change Option Group value (from # to text)

6 New Member
Help me out please...

Ok, i have been trying to do this for months….I kinda gave up on it but am back at it again.

I created a form for a table (Bills). In the form, I have three option buttons (Yes,Tbd,No). The problem is that the value of these options are numbers (1,2,3). Therefore, every time I add a record using the form I end up with numbers on the column (A_Approved). So basically now I have to go to the table & change the numbers into (yes,tbd,no) manually!! It Sucks. Cause I know there has to be some kind of way.

Some one told me that I should use 'Select Case' and the following is what I came up with (totally not working), U can ignore if it doesn’t make sense.


Private Sub Frame38_AfterUpdate()
dim xy as integer
dim ab as string (i wanted to define this as text but i dont know how)

xy=frame38.value

Select Case Me!Frame38
Case 1:
xy="YES"
Case 2:
xy="TBD"
............

End Select


Thank u very much for reading.
Jul 13 '07 #1
5 23575
ADezii
8,834 Recognized Expert Expert
Help me out please...

Ok, i have been trying to do this for months….I kinda gave up on it but am back at it again.

I created a form for a table (Bills). In the form, I have three option buttons (Yes,Tbd,No). The problem is that the value of these options are numbers (1,2,3). Therefore, every time I add a record using the form I end up with numbers on the column (A_Approved). So basically now I have to go to the table & change the numbers into (yes,tbd,no) manually!! It Sucks. Cause I know there has to be some kind of way.

Some one told me that I should use 'Select Case' and the following is what I came up with (totally not working), U can ignore if it doesn’t make sense.


Private Sub Frame38_AfterUpdate()
dim xy as integer
dim ab as string (i wanted to define this as text but i dont know how)

xy=frame38.value

Select Case Me!Frame38
Case 1:
xy="YES"
Case 2:
xy="TBD"
............

End Select


Thank u very much for reading.
  1. Make sure your Option Group is Unbound.
  2. Create a Text Box on your Form and Name it txtValues.
  3. Set the Control Source of this Field to the Field in the underlying Table that will store the values of YES, TBD, and NO.
  4. Set the Visible Property of txtValues to No.
  5. Copy and Paste the following code to the AfterUpdate() Event of the Option Group Frame.
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Frame38_AfterUpdate()
    2. Select Case Me![Frame38]
    3.   Case 1
    4.     Me![txtValues] = "YES"
    5.   Case 2
    6.     Me![txtValues] = "TBD"
    7.   Case 3
    8.     Me![txtValues] = "NO"
    9. End Select
    10. End Sub
  6. When you click on an Option in the Frame, the appropriate Text will be written to txtValues and stored in the Database as Text.
  7. This process will be completely Transparent to the User, since the Text Box is invisible.
  8. Let me know how you make out.
Jul 13 '07 #2
Student1000
6 New Member
Thanks ADezii, that works very well. I followed exactly what u said "It works!!"

Thanks again.
Jul 13 '07 #3
ADezii
8,834 Recognized Expert Expert
Thanks ADezii, that works very well. I followed exactly what u said "It works!!"

Thanks again.
You are quite welcome.
Jul 13 '07 #4
DanicaDear
269 Contributor
This worked for me too. Thank you ADezii!
Mar 27 '14 #5
ADezii
8,834 Recognized Expert Expert
You are quite welcome, DanicaDear.
Mar 28 '14 #6

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

Similar topics

2
1569
by: Ian Eagland | last post by:
Hi I am just starting on Visual C (2003) from a VB background. I find it easier to learn by actually programming. I have fallen over at the first hurdle. How do you extract a numerical value...
1
1862
by: Jerry John | last post by:
I am working in ASP.NET with C#. I have a text file which contains datas with delimiters. For example:- MSH|^~\$|DISCHARGE|CLAY COUNTY MEMORIAL|||200502110939| I also have an XML file created...
6
1484
by: monikagovindaraj | last post by:
how to get the color pallete in single value from text box in php
1
1142
by: AnDiKa | last post by:
Dim DatTim1 As Date = #12/1/2007# Dim DatTim2 As Date = #12/1/2007# Dim WD As Long = DateDiff(DateInterval.Day, DatTim1, DatTim2) Me.totalCount.Text = WD + 1 I used the code above to...
4
3212
by: mandarchalke29 | last post by:
Can anyone please tell me how do set the javascript variable value to a simple text file and to retrieve the same value using PHP. Means to set the value in text file using javascript and to get...
5
2398
by: dmorand | last post by:
Ok, I'm very new to asp, but this is what I'm trying to accomplish. I want to have a selection drop down list where the user can select a database to load. When they select the database, I want...
2
4639
by: mndprasad | last post by:
Hi friends, Am new to AJAX coding, In my program am going to have two texbox which going to implent AJAX from same table. One box is going to retrieve the value of other and vice...
11
5262
tuxalot
by: tuxalot | last post by:
Another quick question for ya... Here's my button code, and I want to see if I can do something different so I don't have to repeat the same code for each of my 14 buttons in my option group: ...
1
3820
by: wayne smith | last post by:
Hi, I am building a inventory system using ms access. Each inventory id can be from different regions. In one form, users enter the inventory id and if there is more than one region, another form...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7324
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
7382
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
7495
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
5052
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
3193
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
3181
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1556
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 ...
0
418
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.