473,406 Members | 2,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,406 software developers and data experts.

Lookup value in weighting table

Bear with me – a long question but hopefully someone can help me.

I have a survey which uses weighting to get the final score. I’m trying to
find the best way to calculate the final score.

I have two tables
A table with all the employee information which includes the [QuesNo],
[EETitle], [EEAnswer] and [MgrAnswer].

A table that will be used as a lookup to determine the weighting of that
particular question. The fields are [QuesNoW]; [EETitleW], [EEAnswerW]; and
[MgrAnswerW].

For example,
For question 1.1, the weighting factor for a manager is 3.
If employee answered 9 for question 1.1 and the title is manager, then the
final score would be 27.

For question 1.1, the weighting factor for a data entry clerk is 5.
If employee answered 9 for question 1.1 and their title is data entry clerk,
then the final score would be 45.

First I would need to look up the [Quesno] in the Weighting Table. Once
[QuesnoW] is found, then lookup the [TitleWeight]. Once title is found,
multiply the value of [Answer1] by the value that is in
When the value in [Answer1]=9, then the total score would be 27.

If tblEeFile [quesno] = tblweighting[QuesNoW]
and if
tblEeFile [EETitle] = tblweighting [EETitleW]
then
multiply the value of
tblEeFile [EEAnswer] X tblweighting [EEAnswerW]

If this is confusing, please ask me more questions and I can explain better.

Thanks for any help I can get.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200510/1
Nov 13 '05 #1
1 1689
Sounds as though you want something like:

SELECT tblEeFile.QuesNo,
tblEeFile.EEAnswer,
IIf(tblEeFile.EETitle = Nz(tblweighting.EETitleW, ""),
tblEeFile.EEAnswer * tblweighting.EEAnswerW,
tblEeFile.EEAnswer) AS WeightedAnswer
FROM tblEeFile
LEFT JOIN tblweighting
ON tblEeFile.QuesNo = tblweighting.QuesNoW

This will score the answer as is if the titles don't correspond, and
multiply by the weight if they do.

I assume there are more fields in tblEeFile that would need to be added to
the query.

I don't pretend to understand how MgrAnswer and MgrAnswerW enter into
this...

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"jhicsupt via AccessMonster.com" <u14456@uwe> wrote in message
news:5646fd5792b96@uwe...
Bear with me – a long question but hopefully someone can help me.

I have a survey which uses weighting to get the final score. I’m trying
to
find the best way to calculate the final score.

I have two tables
A table with all the employee information which includes the [QuesNo],
[EETitle], [EEAnswer] and [MgrAnswer].

A table that will be used as a lookup to determine the weighting of that
particular question. The fields are [QuesNoW]; [EETitleW], [EEAnswerW];
and
[MgrAnswerW].

For example,
For question 1.1, the weighting factor for a manager is 3.
If employee answered 9 for question 1.1 and the title is manager, then the
final score would be 27.

For question 1.1, the weighting factor for a data entry clerk is 5.
If employee answered 9 for question 1.1 and their title is data entry
clerk,
then the final score would be 45.

First I would need to look up the [Quesno] in the Weighting Table. Once
[QuesnoW] is found, then lookup the [TitleWeight]. Once title is found,
multiply the value of [Answer1] by the value that is in
When the value in [Answer1]=9, then the total score would be 27.

If tblEeFile [quesno] = tblweighting[QuesNoW]
and if
tblEeFile [EETitle] = tblweighting [EETitleW]
then
multiply the value of
tblEeFile [EEAnswer] X tblweighting [EEAnswerW]

If this is confusing, please ask me more questions and I can explain
better.

Thanks for any help I can get.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200510/1

Nov 13 '05 #2

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

Similar topics

1
by: jobz | last post by:
I need to randomly pick films from a list to automatically generate a timetable. Each film has a priority and weighting that affects how often it is picked. For example, say we have 3 films with...
8
by: Lucas Lemmens | last post by:
Dear pythonians, I've been reading/thinking about the famous function call speedup trick where you use a function in the local context to represent a "remoter" function to speed up the 'function...
9
by: Koen | last post by:
Hi all, My application uses a lot of lookup tables. I've splitted the frontend (forms, reports, etc) from the backend (data). The database has around 10 different users. The values in the...
3
by: my-wings | last post by:
I've been reading about how evil Lookup fields in tables are, but I've got to be missing something really basic. I know this subject has been covered before, because I've just spent an hour or two...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
1
by: Paul H | last post by:
Say I have a table called tblPeopleInfo, one of the fields in the table is called FavouriteFruit. The FavouriteFruit field is a lookup field and will contain Apples, Oranges, Grapes etc..The list...
1
by: James | last post by:
I am used to VB6 but need to develop something in .Net. I need to create several bound combo-boxes which will use lookup tables to get their values. I created a form using the dataform wizard....
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
11
by: Paul H | last post by:
Suppose I have a table called tblPeople and I want a field to illustrate whether each person prefers cats or dogs. I could do it one of three ways. 1. A plain text field Create a text field in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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...
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
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...
0
agi2029
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,...
0
isladogs
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 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.