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

Access Report, Conditional Text

I currently have a report that lists employees and the points they
have. This information is edited through a form.

Currently on the report I have...

EMPLOYEEID NAME POINTS
CZ323 John Smith 2

What I'd like for it to do is show the number of points but beside it
give their status depending on the points they have. For example...

If points < 5 = no status text
If points >4 AND <7 = Verbal Warning
If points >6 AND <9 = 1st Written Warning
If points EQUAL 9 = 2nd Written Warning
If points >= (GREATER OR EQUAL) 10 = Review Board

Plain text of the above:
(0-4) NONE
(5-6) Verbal Warning
(7-8) 1st Written Warning
(9) 2nd Written Warning
(10) Review Board

I don't know how to make this work. This can be a text field beside the
points I just don't know how to make certain text display on a
condition. Thanks for your help in advance!!!

Nov 13 '05 #1
6 2272
David wrote:
I currently have a report that lists employees and the points they
have. This information is edited through a form.

Currently on the report I have...

EMPLOYEEID NAME POINTS
CZ323 John Smith 2

What I'd like for it to do is show the number of points but beside it
give their status depending on the points they have. For example...
...


This problem seems similar to:

http://groups-beta.google.com/group/...c59165e0c16021

which involved different messages to students based on numerical
grades. Post back if Richard's technique won't work for you.
James A. Fortune

Nov 13 '05 #2
Why not try a Select Case?
Select Case points
Case points < 5
result = " "
Case points >= 5 AND <= 7
result = "1st Warning"
etc...
Case Else
(Default result)
End Select

Maybe this'll work without all the frustrating and cluttered ElseIf's

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #3
Christina Grabe via AccessMonster.com wrote:
Why not try a Select Case?
...
Maybe this'll work without all the frustrating and cluttered ElseIf's

--
Message posted via http://www.accessmonster.com


That's a good idea. You can tell from my response he quoted that I
envisioned using Select Case.

James A. Fortune

Nov 13 '05 #4
Chuck Grimsby wrote:
The Switch function can also be useful here....

On Wed, 29 Dec 2004 18:40:35 GMT, "Christina Grabe via
AccessMonster.com" <fo***@AccessMonster.com> wrote:
Why not try a Select Case?
Select Case points
Case points < 5
result = " "
Case points >= 5 AND <= 7
result = "1st Warning"
etc...
Case Else
(Default result)
End Select
Maybe this'll work without all the frustrating and cluttered
ElseIf's

--
Sects! Sects! Sects! Is That All Monks Think About?


Using the switch function can replace the user-defined function
entirely, especially since there are fewer cases to consider.

James A. Fortune

When you're in the zone you'll run five maybe 10 racks in a row. Then
someone, maybe me, will say, "Nice shooting, Jim." But you won't think
about it while shooting. There's no adrenaline. You just put your
conscious mind in the background and let the subconscious take over.
To your mind say, "Let the body play." --- Jeff Macauley

Nov 13 '05 #5
"Christina Grabe via AccessMonster.com"
<fo***@AccessMonster.com> wrote in
news:16******************************@AccessMonste r.com:
Why not try a Select Case?
Select Case points
Case points < 5
result = " "
Case points >= 5 AND <= 7
result = "1st Warning"
etc...
Case Else
(Default result)
End Select

Maybe this'll work without all the frustrating and cluttered
ElseIf's

I have a quibble with Case points >= 5 AND <= 7
In a case structure, as long as you process in numerical
sequence, you only need to test for the upper limit, since the
previous test will have handled the lower limit.

Therefore
Case <5
Case <7
Case <9
Case <10
Case >=10
Case Else ' Handles nulls and errors

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #6
Bob Quintal wrote:
I have a quibble with Case points >= 5 AND <= 7
In a case structure, as long as you process in numerical
sequence, you only need to test for the upper limit, since the
previous test will have handled the lower limit.

Therefore
Case <5
Case <7
Case <9
Case <10
Case >=10
Case Else ' Handles nulls and errors

--
Bob Quintal

PA is y I've altered my email address.


Nice optimization Bob. Another thing to keep in mind about Richard's
problem was that he wanted to use values from table(s) to be able to
change the limits by changing values in the table(s). David's example
is not as likely to change limits as quickly so the switch concept
looks promising.

James A. Fortune

Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
5
by: Richard | last post by:
Hi, I have a form that take some time to load due to many comboboxes and at least 8 subforms. When I filter or sort the main form I get an error message and then Access shuts down. They ask if...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
3
by: (Pete Cresswell) | last post by:
I'm doing a booklet for a class reunion. Got all the data and everybody's life history in a little MS Access app and now it's time to get the booklet ready to go to the printer's. I have a...
5
by: Andrew Chanter | last post by:
Does anyone know a way you can use conditional formatting to create a banded style view as is commonly seen on the internet. (In othe words the first record appears on a gray background, the 2nd...
3
by: smuir | last post by:
I am working with a basic access form for a payroll system and need to modify it such that if an employee worked overtime, then their overtime payrate and hours show up on the report below their...
7
by: olseni | last post by:
Hi all I hope someone can help me with this. I am sure there is a solution, but I cannot seem to find it.... I need to make a report with the following format: In the columns I have 5 samples,...
4
by: J Lagos | last post by:
I want to change the backcolor of textboxes in a report depending on their value. I messed with this for a few hours but I'm not savvy with the syntax for getting at controls in a report. can...
4
by: riaane | last post by:
Please help: I have Conditional Formatting on a Report Field that fills the background Red if the criteria is met. This displays correctly in Report View, however, when I "OutputTo" this report to...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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
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...

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.