Help with Calculation of Multiple Records

P

pmarisole

I need help in calculating a score for each employee based on values
submitted from drop-down boxes
Example:
Emp1 TeamScore(1-10)
Emp2 TeamScore(1-10)
Emp3 TeamScore(1-10)
Emp4 TeamScore(1-10)
Emp5 TeamScore(1-10)

I want to take the values from each drop-down and multiply them by a
weighted score that I get
from another database table (ie 0.11 etc)


I get a Type Mismatch (string) error when I run the following code:
MLevel2 = "0"
On Error Resume Next
Set C9 = Server.CreateObject("ADODB.Connection")
C9.Open "Provider=sqloledb;Data
Source=ebs-sqlc1-vs3.edn.runi.com\SSS;UID=casuser;PWD=hppccas;DATABASE=skil­ls"

Set rsScors= Server.CreateObject("ADODB.Recordset")
sSQ5 = "Select * from WgtScore where org = '" & session("orgg") & "'
AND mgmtlevel = '" & MLevel2 & "'"
rsScors.Open sSQ5, C9, adOpenKeySet,adLockReadOnly, adCmdText
D5 = rsScors("QDiv5")
SS5 = "0.0"
S11 = round(rsScors("WS1"),2)
rsScors.close
set rsScors = Nothing


strID = split(request.form("Emp"), ", ")
QQ1 = split(request.form("Q1")* S11,",")
FOR i = LBound(strID) TO UBound(strID)
sSQL = "UPDATE EAPcurrentyear SET Q1= '" & trim(QQ1(i)) & "' where
(empid ='" & strID(i) & "')"
C9.Execute(sSQL)
NEXT
C9.Close
Set C9 = Nothing
%>


Any help with this would be Greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top