473,385 Members | 1,356 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,385 software developers and data experts.

Populate a text box with text based on a score

I have an access form which is used for auditing purposes.

As part of the process, a score is calculated on the form which displays on the last tab of my form to prompt the user as to who they need to notify based on the score.

For example, a score of more than 80 is a "Low Risk", a score of less than 80 is a "medium risk" and a score of less than 50 is a "high risk".

What I need to do is have a text box that can display the "Low Risk" etc. text based on the outcome of a score which is populated in the txtscore box.

Any ideas on how I can do this?
Oct 29 '14 #1

✓ answered by zmbd

Another method to this is to use a table.
have your cutoffs in one field with the related text in the second field.
This way instead of having to re-code the form should you need to change the text or the cutoff range(s) you simply alter the table.

4 1079
twinnyfo
3,653 Expert Mod 2GB
benny1983,

Try something like this:

Expand|Select|Wrap|Line Numbers
  1. Me.txtOverallRisk = IIf(Me.txtScore >= 80, "Low Risk", _
  2.     IIf(Me.txtScore < 50, "High Risk", "Medium Risk"))
Hope this hepps!
Oct 29 '14 #2
Perfect - Thanks very much!
Oct 29 '14 #3
twinnyfo
3,653 Expert Mod 2GB
Glad I could be of some service! Have a great day!
Oct 30 '14 #4
zmbd
5,501 Expert Mod 4TB
Another method to this is to use a table.
have your cutoffs in one field with the related text in the second field.
This way instead of having to re-code the form should you need to change the text or the cutoff range(s) you simply alter the table.
Oct 30 '14 #5

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

Similar topics

1
by: ziggs | last post by:
I have an asp form that has a text box called "colorBox". Just before text box is the word "Color" that is hyperlinked and will run the color.asp if pressed to show all of the colors in a...
4
by: Jack | last post by:
I'd like to set up a wiki system for a project I'm working on. Since I'm not good at databases, and there's really not much stuff to put into the wiki, I hope it is text file-based. I used...
2
by: SHAWTY721 | last post by:
I have a form that contains two combo boxes that are related to each other. I need to find a way to populate my text box based on the criteria of the two combo boxes so the appropriate number...
4
by: whamo | last post by:
I have the need to populate a field based on the selection in a combo box. Starting out simple. (2) tables tbl_OSE_Info and tbl_Input; tbl_OSE_Info has three fields: Key, OSE_Name and OSE_Wt...
1
by: Peader | last post by:
Hi, I have a table with two columns "Job Order" and "Part Number", I'd like to populate a text field in a form with these values, whats the best way to do it? There's only ever 1 row in the...
1
UTuser
by: UTuser | last post by:
I'm not having much luck looking for answers in the archives for what it is I want to set up in my Access DB. If I could get some direction as to the function I should look at, this will be a big...
4
by: dekk | last post by:
I am trying to populate a text field from the combo selection. I have the following update event in the combo box Private Sub cboContract_AfterUpdate() Me!txtDesc = Me!cboContract.Column(1)...
4
by: almaroc | last post by:
I have a list box of company names and i need to populate a text box with the corresponding value from the usage field. my table is named Average. the fields are Customer and Usage. i used this code...
19
by: SEMKTG | last post by:
I have a calculating form. Once the end user hits the calculate button to get their results, we want those results to dynamically populate a text area to show them information directly related to...
10
by: tmdrake | last post by:
My form includes a combo box where you select what type of test you ran. Based on that selection and the information entered into two additional text boxes, I need to populate a text box on the same...
1
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.