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.
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.
- Make sure your Option Group is Unbound.
- Create a Text Box on your Form and Name it txtValues.
- Set the Control Source of this Field to the Field in the underlying Table that will store the values of YES, TBD, and NO.
- Set the Visible Property of txtValues to No.
- Copy and Paste the following code to the AfterUpdate() Event of the Option Group Frame.
- Private Sub Frame38_AfterUpdate()
-
Select Case Me![Frame38]
-
Case 1
-
Me![txtValues] = "YES"
-
Case 2
-
Me![txtValues] = "TBD"
-
Case 3
-
Me![txtValues] = "NO"
-
End Select
-
End Sub
- When you click on an Option in the Frame, the appropriate Text will be written to txtValues and stored in the Database as Text.
- This process will be completely Transparent to the User, since the Text Box is invisible.
- Let me know how you make out.
Thanks ADezii, that works very well. I followed exactly what u said "It works!!"
Thanks again.
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.
This worked for me too. Thank you ADezii!
ADezii 8,834
Recognized Expert Expert
You are quite welcome, DanicaDear.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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...
|
by: monikagovindaraj |
last post by:
how to get the color pallete in single value from text box in php
|
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...
|
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...
| |
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...
|
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...
|
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:
...
|
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...
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
| |
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...
| |