I thank you very much for your advise besides I don't mean to make things difficult for those Helping me or make them think too much. my appologies.
Now, I have a query named "Students subform" in an access database and in this query there is a table named "Student Subform Subquery" and it has the following fields; "StudentID", "Grade", "Grade(%)"... .
The expression below works correctly. However, i thought of making it customizable thus designing a form for it and make a command button in the event proceedure to fire this action on click but do not know how to go about it. - Grade:
-
IIf([Grade (%)] Between 0.8 And 1,
-
"Excellent",
-
IIf([Grade (%)] Between 0.7 And 0.79,
-
"Very Good",
-
IIf([Grade (%)] Between 0.6 And 0.69,
-
"Good",
-
IIf([Grade (%)] Between 0.45 And 0.59,
-
"Credit",
-
IIf([Grade (%)] Between 0.35 And 0.44,
-
"Pass",
-
IIf([Grade (%)]<=0.34,
-
"Fail"))))))
I have a table named "ScoreRange" and in it i have the following fields; "ID", "Range From", "Range To", "Interpretation". So I want make the "Grade" expression to pick its information from the the table "ScoreRange".
Attached is a word copy of the screen print of what i mean.
Please help.
Thank you
5 1333
However, I thought of making it customizable thus designing a form for it and make a command button in the event proceedure to fire this action on click but do not know how to go about it
I'm not sure what action you are talking about. Also, as I'm at work, I can't view your attached file.
A little side note, your query might be a little easier to read if you would use the Switch() function instead of nesting all those IIF statements. Switch Function zmbd 5,501
Expert Mod 4TB
Emmanuel Ayivi:
It just seems to be common practice to not download or open files that are not requested. You can directly up load the jpg the same way up uploaded the docx.
Seth's suggestion for the Select is also a very good one.
Now for your other question.
You should be able to refer to the second table from within the calculated field of the query much like a lookup field. However, instead of all of those between statments I'd use a single cut-off value.
zmbd 5,501
Expert Mod 4TB
Sorry, called away for other project.
to continue my thought...
However, the logic behind the single cut off field might be a tad much
So If you use a table that has a min and max range for the grade lookup then in your query, design mode, show the table with your students grades and the grade lookup table. Pull down all of the fields from the table with the student data that you want to show (last_name, course, etc) and then pull down the field from the lookup table that has the user friendly text and set a criteria so that the student's grade is between the range.
Give it a try... if you're still haveing issues then post back.
You can then use a condition in the
NeoPa 32,556
Expert Mod 16PB
Lose the [Range To] field, as it is redundant, and return the [Student Subform Subquery] record that matches the minimum value of [Range From] which is less than or equal to [Range (%)]. Then, your field would be coded as : NeoPa 32,556
Expert Mod 16PB
I'd just like to add that this is a vast improvement over many recent questions that had to be deleted. This one, though not perfect, is certainly one of the better questions we get. Your effort is obvious and appreciated.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: MKoleoso |
last post by:
Problem: C#- Unable to create instance of a class
implementing from an interface
I have:
namespace someNamespace
{
public __gc class SomeClass1
{
}
|
by: Marcin Kowalewski |
last post by:
Hi I've got a stupid problem with code below :
using System;
using System.Drawing;
....
public class CsrcImage :Image
{
public CsrcImage()
{
//
|
by: Gates72 |
last post by:
Hello All,
I am looking for an example showing a custom EventArgs
class that derives from CancelEventsArgs, and a form or
control using that class in a custom event.
The simpler, the better,...
|
by: Henke |
last post by:
Hi!
I have a abstract base class that derives from System.Web.UI.Page. In this
class I have some abstract methods.
My other web pages should derive from this class and implement the abstract...
|
by: mcollier |
last post by:
I'm having trouble getting my server controls in my code-behind file to
initialize. I field names exactly match that of the control in the
ASPX file. The controls are also public. However, in my...
|
by: Brian Takita |
last post by:
Hello,
Is there a way to unit test a that derives from IHttpHandler that uses
the HttpResponse in the HttpContext passed to it?
When I try to call the context.Response.End() method, I get the...
|
by: eiji |
last post by:
Hi folks,
I found this code in a project:
> class TestList : public std::vector<Test> { /*empty!!!*/ };
Basicly this ends up in the same result like
> typedef...
|
by: gyan |
last post by:
Please go though following program:
#include <iostream.h>
class base {
public:
int basepublic;
protected:
int baseprotected;
};
|
by: hufaunder |
last post by:
Imagine you have a charting library that can draw lines, bars,
floating bars, bands, etc.
Lines and bars need only one input. Floating bars and bands need two
inputs. There are two approaches:
...
|
by: Peted |
last post by:
Hello
this is the click event method of a radio button
private void radioButton1_Click(object sender, EventArgs e)
{
}
|
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
|
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...
|
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,...
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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: 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,...
| |