Hi guys,
I have a problem with an option group and a two corresponding text boxes. When the user chooses an option value i want the text boxes to populate with text dependent on the choice made.
I have written an AfterUpdate procedure on the frame to try and assign the text to the value of the text box, but for some reason it does nothing...
Here is the code:
Private Sub Frame0_AfterUpd ate()
If Frame0.Value = 1 Then
Typeofsharpinju ry.Value = "Intact skin visibly contaminated with blood or any body substance"
Risklevel.Value = "Non-parenteral exposure"
ElseIf Frame0.Value = 2 Then
Typeofsharpinju ry.Value = "Intraderma l (superficial) injury with a needle considered NOT to be contaminated with blood or body substance"
Risklevel.Value = "Doubtful exposure (Low-risk)"
ElseIf Frame0.Value = 3 Then
Typeofsharpinju ry.Value = "Superficia l wound not associated with visible bleeding, caused by an instrument cosidered NOT to be contaminated with blood or a body substance"
Risklevel.Value = "Doubtful exposure (Low-risk)"
ElseIf Frame0.Value = 4 Then
Typeofsharpinju ry.Value = "Prior wound or skin lesion contaminated with a body substance other than blood e.g. urine"
Risklevel.Value = "Doubtful exposure (Low risk)"
ElseIf Frame0.Value = 5 Then
Typeofsharpinju ry.Value = "Mucous membrane or conjunctival contact with a body fluid other than blood"
Risklevel.Value = "Doubtful exposure (Low-risk)"
ElseIf Frame0.Value = 6 Then
Typeofsharpinju ry.Value = "Intraderma l (superficial) injury with a needle contaminated with blood or body subtance"
Risklevel.Value = "Possible exposure (Medium-risk)"
ElseIf Frame0.Value = 7 Then
Typeofsharpinju ry.Value = "A wound NOT associated with visible bleeding, produced by an instrument contaminated with blood or body substance"
Risklevel.Value = "Possible exposure (Medium-risk)"
ElseIf Frame0.Value = 8 Then
Typeofsharpinju ry.Value = "Prior wound or skin lesion contaminated with blood or body substance"
Risklevel.Value = "Possible exposure (Medium-risk)"
ElseIf Frame0.Value = 9 Then
Typeofsharpinju ry.Value = "Mucous membrane or conjunctival contact with blood or body substance"
Risklevel.Value = "Possible exposure (Medium-risk)"
ElseIf Frame0.Value = 10 Then
Typeofsharpinju ry.Value = "Skin penetrating injury with a needle contaminated with blood or body substance"
Risklevel.Value = "Definite exposure (High-risk)"
ElseIf Frame0.Value = 11 Then
Typeofsharpinju ry.Value = "Injection of blood/body substance <1ml"
Risklevel.Value = "Definite exposure (High-risk)"
ElseIf Frame0.Value = 12 Then
Typeofsharpinju ry.Value = "Laceration or similar wound which caused bleeding, and is produced by an instrument that is visibly contaminated with blood or body substance"
Risklevel.Value = "Definite exposure (High-risk)"
ElseIf Frame0.Value = 13 Then
Typeofsharpinju ry.Value = "In laboratory settings, any direct inoculation with HIV tissue or material likely to contain HIV, HBV or HCV not included above."
Risklevel.Value = "Definite exposure (High-risk)"
ElseIf Frame0.Value = 14 Then
Typeofsharpinju ry.Value = "Transfusio n of blood"
Risklevel.Value = "Massive exposure (High-risk)"
ElseIf Frame0.Value = 15 Then
Typeofsharpinju ry.Value = "Injection of large amount of blood/body substance >1ml"
Risklevel.Value = "Massive exposure (High-risk)"
ElseIf Frame0.Value = 16 Then
Typeofsharpinju ry.Value = "Parenteral exposure to laboratory specimens containing high titre of virus"
Risklevel.Value = "Massive exposure (High-risk)"
End If
End Sub
Thanks in advance guys.
Chris
1 2333 MMcCarthy 14,534
Recognized Expert Moderator MVP
Try this ... -
Private Sub Frame0_AfterUpdate()
-
-
SELECT CASE Frame0
-
-
Case 1
-
Me.Typeofsharpinjury.Value = "Intact skin visibly contaminated with blood or any body substance"
-
Me.Risklevel.Value = "Non-parenteral exposure"
-
Case 2
-
Me.Typeofsharpinjury.Value = "Intradermal (superficial) injury with a needle considered NOT to be contaminated with blood or body substance"
-
Me.Risklevel.Value = "Doubtful exposure (Low-risk)"
-
Case 3
-
Me.Typeofsharpinjury.Value = "Superficial wound not associated with visible bleeding, caused by an instrument cosidered NOT to be contaminated with blood or a body substance"
-
Me.Risklevel.Value = "Doubtful exposure (Low-risk)"
-
Case 4
-
Me.Typeofsharpinjury.Value = "Prior wound or skin lesion contaminated with a body substance other than blood e.g. urine"
-
Me.Risklevel.Value = "Doubtful exposure (Low risk)"
-
Case 5
-
Me.Typeofsharpinjury.Value = "Mucous membrane or conjunctival contact with a body fluid other than blood"
-
Me.Risklevel.Value = "Doubtful exposure (Low-risk)"
-
Case 6
-
Me.Typeofsharpinjury.Value = "Intradermal (superficial) injury with a needle contaminated with blood or body subtance"
-
Me.Risklevel.Value = "Possible exposure (Medium-risk)"
-
Case = 7
-
Me.Typeofsharpinjury.Value = "A wound NOT associated with visible bleeding, produced by an instrument contaminated with blood or body substance"
-
Me.Risklevel.Value = "Possible exposure (Medium-risk)"
-
Case = 8
-
Me.Typeofsharpinjury.Value = "Prior wound or skin lesion contaminated with blood or body substance"
-
Me.Risklevel.Value = "Possible exposure (Medium-risk)"
-
Case = 9
-
Me.Typeofsharpinjury.Value = "Mucous membrane or conjunctival contact with blood or body substance"
-
Me.Risklevel.Value = "Possible exposure (Medium-risk)"
-
Case = 10
-
Me.Typeofsharpinjury.Value = "Skin penetrating injury with a needle contaminated with blood or body substance"
-
Me.Risklevel.Value = "Definite exposure (High-risk)"
-
Case = 11
-
Me.Typeofsharpinjury.Value = "Injection of blood/body substance <1ml"
-
Me.Risklevel.Value = "Definite exposure (High-risk)"
-
Case = 12
-
Me.Typeofsharpinjury.Value = "Laceration or similar wound which caused bleeding, and is produced by an instrument that is visibly contaminated with blood or body substance"
-
Me.Risklevel.Value = "Definite exposure (High-risk)"
-
Case = 13
-
Me.Typeofsharpinjury.Value = "In laboratory settings, any direct inoculation with HIV tissue or material likely to contain HIV, HBV or HCV not included above."
-
Me.Risklevel.Value = "Definite exposure (High-risk)"
-
Case = 14
-
Me.Typeofsharpinjury.Value = "Transfusion of blood"
-
Me.Risklevel.Value = "Massive exposure (High-risk)"
-
Case = 15
-
Me.Typeofsharpinjury.Value = "Injection of large amount of blood/body substance >1ml"
-
Me.Risklevel.Value = "Massive exposure (High-risk)"
-
Case = 16
-
Me.Typeofsharpinjury.Value = "Parenteral exposure to laboratory specimens containing high titre of virus"
-
Me.Risklevel.Value = "Massive exposure (High-risk)"
-
END SELECT
-
-
End Sub
-
Also double check the names of the textboxes. You can do this in properties under the other tab. Make sure that the textbox names are what you think they are.
Mary
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Frank Py |
last post by:
I have 4 possible values that I would like to populate a text box with
depending on which 4 values are sleected in a select box. Is there an
example out there for this?
Thanks
Frank
*** Sent via Developersdex http://www.developersdex.com ***
|
by: C. David Rossen |
last post by:
Hello:
I have a registration form for classes. Each class has a fee. I have a
drop down box whereby the user chooses his class. There is a textbox with
the associated fee. I would like to auto populate the fee textbox depending
on what class the user chooses. In the email, the value of the drop down
box has to be the name of the class and the value of the fee text box has to
be the fee. Can someone please help me in accomplishing...
|
by: Greg Scharlemann |
last post by:
I would like to automatically populate a drop down menu when the page
loads based on the selection of an item in a different drop down menu.
I made a test page that when drop down #1 changes, drop down #2
populates. Does anyone know how to get drop down #2 to populate based
on what is selected in drop down #1 when the page loads?
Here is my test code:
************************************************************************
<html>...
|
by: Dannyboyo |
last post by:
I have what I hope is a simple request. I can't really code in javascript, but I am pretty good at cusomizing it with
slight modifications. I code in ASP and HTML.
I am trying to capture customer input of product names to put on custom labels we make. Some of the labels will have our
product names on them, but the customer can add other products that we do not sell.
So, on my product detail page I want a textbox that can have rows copied...
|
by: James Goodman |
last post by:
I have a listbox named sub1 on an asp page. I need to fill this list with
values from a table. These are selected based upon the selection of a
value/s in another listbox.
It was suggested that I use a hidden iframe on my main page, & carry out the
processing inside the frame, using jscript.
If I open the page in a browser, & make a selection in the first listbox
(named main), the data in the frame appears to be processed correctly, the...
| |
by: jzhang29 |
last post by:
I have a JSP page and it contains a dropdown list called Office.
What I try to do is:
When I select different office from this list, the information of office
(address, phone,etc) will be populated in same JSP page.
I have a java bean called officeBean that contains all the office
information.
|
by: tinman486 |
last post by:
Im new to the whole javascript game, I know pretty much just enough to be dangerous with no real substance. Anyway Im trying to populate a DIV with a website using the URL as an inner html source
Here is my code I keep getting an error object expecte don line 58. Which I will highlight. Anyway Not only would i Like to know what that error is about but also if my logic is correct or if I can even do what im trying... and if not what other...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |