Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save results of calculated field to table /coping with reverse scores

Status
Not open for further replies.

rdholdford

Technical User
Apr 27, 2002
9
0
0
US
I have a form for a 75-item psychological test. I need to calculate totals for the entire test and also totals for subscales. The test is a true-false test with data entered as 0 or 1. I have made calculated fields that will score some of the subscales but I need the results to be saved in the table and I don't know how. Also, on one of the subscales some items are reverse scored, which I discovered after the data was entered. So some items that are True and are recorded as 0, should be changed to 1 and some items that are false should be changed to 0 before totals are derived. I sure hope this makes sense to somebody!
 
On the first, change your SELECT statement to a SELECT INTO and put the results into the table you want. As for the other, I am guessing that your database looks something like this:

lngIdentity (Primary key)
lngSurveyID (unique for each person)
lngQuestionID
lngSubscaleID (groups questions)
fAnswer (boolean)

Then just do:
UPDATE Table1 SET Table1.fValue = Not [fValue]
WHERE (((Table1.lngSubscaleID)=1));

to change all the questions within a subscale to the opposite value they currently have.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top