473,569 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.c om
http://www.accessmonster.com/Uwe/For...ccess/200510/1
Nov 13 '05 #1
1 1702
Sounds as though you want something like:

SELECT tblEeFile.QuesN o,
tblEeFile.EEAns wer,
IIf(tblEeFile.E ETitle = Nz(tblweighting .EETitleW, ""),
tblEeFile.EEAns wer * tblweighting.EE AnswerW,
tblEeFile.EEAns wer) AS WeightedAnswer
FROM tblEeFile
LEFT JOIN tblweighting
ON tblEeFile.QuesN o = tblweighting.Qu esNoW

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.c om" <u14456@uwe> wrote in message
news:5646fd5792 b96@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.c om
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
1474
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 the following priority and weighting, A 1 5% B 2 10% C 3 5% B should be picked more often because of the higher weighting. ...
8
2026
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 lookup'. "This is especially usefull in a loop where you call the function a zillion time" they say. I think this is very odd behavior.
9
7018
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 lookup tables are not likely to change. Question 1: Should I include them in the backend (with rest of data) or the frontend?
3
2910
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 reading about it on google, but there is something I still don't understand, and I'm hoping someone will be willing to explain it to me in small...
3
10623
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 that are hard to find. The main problem I am having right now is that I have a report that is sorted by one of these lookup fields and it only displays...
1
1891
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 can be added to by users of the database. What is the best way to construct this lookup? Should it lookup a Table/Query or a Value List? If it...
1
3352
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. As part of the setup, I specified a new dataset, which included the data & lookup tables. I also specified the relationships when required. I...
4
4606
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 bound to a table as a lookup, drawing values from another table to populate the available selections. This all worked fine in VB6. I have...
11
2633
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 tblPeople called PreferredPet. 2. A lookup field that stores text values. Create a text field in tblPeople called PreferredPetID and use it to...
0
7618
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...
0
7983
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 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...
0
6287
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5223
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...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2117
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
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.