p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

access thread: Auto scoring


Message #1 by "Wallace, Kirk T SSgt" <kirk.wallace@S...> on Wed, 5 Jun 2002 08:49:15 -0500
I have a problem trying to get Access to do what I want. I was hoping someon
out there could help.

I wrote a test in access.  Once the students are done with the test the
database prints out a report of there answers and then closes the report
automativcally.  I want a couple of other things to happen though.  I would
like to be able to have the database automatically score the test and I want
the whole access databse to close when it is done printing.  i want NO user
intervention so I can keep people honest.  If anyone can help I would
appreciate it.

Kirk Wallace

Staff Sergeant Wallace, Kirk T
Marine Detatchment, Fort Sill
MAEMC Instructor

Message #2 by "George Oro" <george@c...> on Wed, 5 Jun 2002 18:14:00 +0400
Kirk,
After your print command code add this line to exit the database after printing: 
doCmd.Quit

What is the basis of your score?

Cheers,
George



-----Original Message-----
From: Wallace, Kirk T SSgt [mailto:kirk.wallace@S...]
Sent: Wednesday, June 05, 2002 5:49 PM
To: Access
Subject: [access] Auto scoring


I have a problem trying to get Access to do what I want. I was hoping someon
out there could help.

I wrote a test in access.  Once the students are done with the test the
database prints out a report of there answers and then closes the report
automativcally.  I want a couple of other things to happen though.  I would
like to be able to have the database automatically score the test and I want
the whole access databse to close when it is done printing.  i want NO user
intervention so I can keep people honest.  If anyone can help I would
appreciate it.

Kirk Wallace

Staff Sergeant Wallace, Kirk T
Marine Detatchment, Fort Sill
MAEMC Instructor



Message #3 by joe.dunn@c... on Wed, 5 Jun 2002 15:22:58 +0000
Your 2 issues were:

Close the database after the report has finished running:

You are (presumably) running the report form a button - this is either
running a macro which includes an OpenReport command - just add a Quit
command after the OpenReport to close the database.

Autoscoring:

Obviously, you can only autoscore if the questions are clear-cut - the
answers must not be a matter of opinion but must be able to be checked
against a set of answers - the ideal scenario is if the questions are
multi-choice (e.g. select one of A, B or C) or a specific answer (e.g. a
number or a word)

 You need a table (say tblANSWERS) which contains one row for each question
and contains at least 2 columns - question_number and answer. You can then
compare the answer supplied by the 'student' against the answer in the
tblANSWERS table and work out whether the answer is right or wrong.

To store the results, build another table (tblRESULTS) with one row per
'student' and 4 columns (Student_Number, Answer_Supplied, Correct_Answer,
Verdict) - derive the verdict (which can be CORRECT, FALSE or even NOT
ANSWERED) by comparing the student's answer with the answer from the
tblANSWERS and then report on the overall result by adding up the correct
answers.

That's the broad idea - you will have to adapt it to your situation. e-mail
me direct if you  get stuck.

Joe Dunn

*************************************************************************

This e-mail may contain confidential information or be privileged. It is intended to be read and used only by the named
recipient(s). If you are not the intended recipient(s) please notify us immediately so that we can make arrangements for its return:
you should not disclose the contents of this e-mail to any other person, or take any copies. Unless stated otherwise by an
authorised individual, nothing contained in this e-mail is intended to create binding legal obligations between us and opinions
expressed are those of the individual author.

The CIS marketing group, which is regulated for Investment Business by the Financial Services Authority, includes:
Co-operative Insurance Society Limited Registered in England number 3615R - for life assurance and pensions
CIS Unit Managers Limited Registered in England and Wales number 2369965  - for unit trusts and PEPs
CIS Policyholder Services Limited Registered in England and Wales number 3390839 - for ISAs and investment products bearing the CIS
name
Registered offices: Miller Street, Manchester M60 0AL   Telephone  0161-832-8686   Internet  http://www.cis.co.uk   E-mail
cis@c...

CIS Deposit and Instant Access Savings Accounts are held with The Co-operative Bank p.l.c., registered in England and Wales number
990937, P.O. Box 101, 1 Balloon Street, Manchester M60 4EP, and administered by CIS Policyholder Services Limited as agent of the
Bank.

CIS is a member of the General Insurance Standards Council

CIS & the CIS logo (R) Co-operative Insurance Society Limited

********************************************************************************
Message #4 by "Wallace, Kirk T SSgt" <kirk.wallace@S...> on Wed, 5 Jun 2002 09:25:24 -0500
George,

I am a real beginner in access.  I haven't written code at all in this
database.  it is all done with macros.  As for the score, the test is a
multip0le choice test.  I would like the right answer to be worth 1 and an
incorrect answer a 0.  I really woould appreciate any help you could give,
also I would appreciate any info on VB code writing. I want to learn how to
do that.

Thank You.

Kirk

-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Wednesday, June 05, 2002 9:14 AM
To: Access
Subject: [access] RE: Auto scoring


Kirk,
After your print command code add this line to exit the database after
printing: 
doCmd.Quit

What is the basis of your score?

Cheers,
George



-----Original Message-----
From: Wallace, Kirk T SSgt [mailto:kirk.wallace@S...]
Sent: Wednesday, June 05, 2002 5:49 PM
To: Access
Subject: [access] Auto scoring


I have a problem trying to get Access to do what I want. I was hoping someon
out there could help.

I wrote a test in access.  Once the students are done with the test the
database prints out a report of there answers and then closes the report
automativcally.  I want a couple of other things to happen though.  I would
like to be able to have the database automatically score the test and I want
the whole access databse to close when it is done printing.  i want NO user
intervention so I can keep people honest.  If anyone can help I would
appreciate it.

Kirk Wallace

Staff Sergeant Wallace, Kirk T
Marine Detatchment, Fort Sill
MAEMC Instructor




Message #5 by "Carnley, Dave" <dcarnley@a...> on Wed, 5 Jun 2002 09:33:42 -0500
You will need to keep in the database a table that holds the correct
answers.  Then you can write a query  that compares each answer to the
correct answer and keep track of the result.  Something like this

First I have to make some assumptions about the structure of your data

tblTestForm
QuestionNumber	int
QuestionText	text
CorrectAnswer	int  (I am assuming here that this is a multiple choice test
so answers are single digits)

tblTestResult
StudentID		int
QuestionNumber	int
StudentAnswer	int


Assuming the tblTestResult only had the ONE STUDENT'S DATA at a time... So
if you had tables like this you could write a query like this (otherwise you
would need to qualify this query using a StudentID)

select R.StudentID, count(*)
from tblTestForm T, tblTestResult R
Where T.QuestionID = R.QuestionID
And T.CorrectAnswer = R.StudentAnswer
Group by StudentID

This will just give you the total # questions answered correctly.

Using some VBA code it would be easy to calculate percentage correct etc but
this is one easy way to get started with something... Maybe if you showed us
some more detail of what you already have I could make better suggestions :)









-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Wednesday, June 05, 2002 9:14 AM
To: Access
Subject: [access] RE: Auto scoring


Kirk,
After your print command code add this line to exit the database after
printing: 
doCmd.Quit

What is the basis of your score?

Cheers,
George



-----Original Message-----
From: Wallace, Kirk T SSgt [mailto:kirk.wallace@S...]
Sent: Wednesday, June 05, 2002 5:49 PM
To: Access
Subject: [access] Auto scoring


I have a problem trying to get Access to do what I want. I was hoping someon
out there could help.

I wrote a test in access.  Once the students are done with the test the
database prints out a report of there answers and then closes the report
automativcally.  I want a couple of other things to happen though.  I would
like to be able to have the database automatically score the test and I want
the whole access databse to close when it is done printing.  i want NO user
intervention so I can keep people honest.  If anyone can help I would
appreciate it.

Kirk Wallace

Staff Sergeant Wallace, Kirk T
Marine Detatchment, Fort Sill
MAEMC Instructor




Message #6 by "Wallace, Kirk T SSgt" <kirk.wallace@S...> on Wed, 5 Jun 2002 09:33:07 -0500
Joe,

I am a beginner is access.  Some of whqat you are saying is greek to me.

The closing of the database,  Yes it is done by a button.  What you
suggested worked.

As for the Autoscoring.  I am ignorant to what you suggested. Maybe it will
help if I explain how I did the questions.
I have a tabbed form.  the title page they input there name, etc.  then tab
threw the question (tabs) and it is a multiple choice answer.  I created a
table of "1,2,3 or 4" and have the combo box refering to that table.  
This may be the wrong way to do it, but I didn't know any other way to do
it.  What you said sounds fantastic but I have no clue on how to do it.

I woul appreciate any help you could give.

Thanks.

Kirk

-----Original Message-----
From: joe.dunn@c... [mailto:joe.dunn@c...]
Sent: Wednesday, June 05, 2002 10:23 AM
To: Access
Subject: [access] Re: Auto scoring



Your 2 issues were:

Close the database after the report has finished running:

You are (presumably) running the report form a button - this is either
running a macro which includes an OpenReport command - just add a Quit
command after the OpenReport to close the database.

Autoscoring:

Obviously, you can only autoscore if the questions are clear-cut - the
answers must not be a matter of opinion but must be able to be checked
against a set of answers - the ideal scenario is if the questions are
multi-choice (e.g. select one of A, B or C) or a specific answer (e.g. a
number or a word)

 You need a table (say tblANSWERS) which contains one row for each question
and contains at least 2 columns - question_number and answer. You can then
compare the answer supplied by the 'student' against the answer in the
tblANSWERS table and work out whether the answer is right or wrong.

To store the results, build another table (tblRESULTS) with one row per
'student' and 4 columns (Student_Number, Answer_Supplied, Correct_Answer,
Verdict) - derive the verdict (which can be CORRECT, FALSE or even NOT
ANSWERED) by comparing the student's answer with the answer from the
tblANSWERS and then report on the overall result by adding up the correct
answers.

That's the broad idea - you will have to adapt it to your situation. e-mail
me direct if you  get stuck.

Joe Dunn

*************************************************************************

This e-mail may contain confidential information or be privileged. It is
intended to be read and used only by the named recipient(s). If you are not
the intended recipient(s) please notify us immediately so that we can make
arrangements for its return: you should not disclose the contents of this
e-mail to any other person, or take any copies. Unless stated otherwise by
an authorised individual, nothing contained in this e-mail is intended to
create binding legal obligations between us and opinions expressed are those
of the individual author.

The CIS marketing group, which is regulated for Investment Business by the
Financial Services Authority, includes:
Co-operative Insurance Society Limited Registered in England number 3615R -
for life assurance and pensions
CIS Unit Managers Limited Registered in England and Wales number 2369965  -
for unit trusts and PEPs
CIS Policyholder Services Limited Registered in England and Wales number
3390839 - for ISAs and investment products bearing the CIS name
Registered offices: Miller Street, Manchester M60 0AL   Telephone
0161-832-8686   Internet  http://www.cis.co.uk   E-mail cis@c...

CIS Deposit and Instant Access Savings Accounts are held with The
Co-operative Bank p.l.c., registered in England and Wales number 990937,
P.O. Box 101, 1 Balloon Street, Manchester M60 4EP, and administered by CIS
Policyholder Services Limited as agent of the Bank.

CIS is a member of the General Insurance Standards Council

CIS & the CIS logo (R) Co-operative Insurance Society Limited

****************************************************************************
****

Message #7 by "Carnley, Dave" <dcarnley@a...> on Wed, 5 Jun 2002 09:47:51 -0500
"I would appreciate any info on VB code writing. I want to learn how to
do that."

It is very easy to learn, you can buy a beginners book for under $50.
Hopefully marines will pay for it ;) 

To make Access exit after your report is closed, go to the VB editor for
that report (in Acc2k, highlight the report in the database window and click
the "code" button.  This will open a  new window that will be mostly empty,
it might say "Option Compare Database" at the top. You will also see two
drop-down boxes just under the menus.  The one on the left will say
(General).  From that drop-down select "Report".  You are now telling VB
that you want to write code responding to events on the REPORT object.  In
the drop-down box on the right side now select "Close".  This means you want
to write code to respond tot he Report Close event.  The VB editor will add
the following text to the window below:

Private Sub Report_Close()

End Sub

(not it probably also added a Report_Open when you selected "Report" from
the left side drop down)

add the command 

DoCmd.Quit

between the Private and End Sub lines.  You just told VB that you want to
Quit Access when this report is closed.  Click the save button, and close
the code window.  You will return to Access and see your report in edit
mode.  Close the report edit window, and guess what happens - Access quits!
That will happen anytime that report is closed.  SO you need to make sure
that anything you want your app to do before it exits is done before you
display that report! Because it is LEAVING when that report closes.

There ya go, one free lesson on VBA coding :)  

David


-----Original Message-----
From: Wallace, Kirk T SSgt [mailto:kirk.wallace@S...]
Sent: Wednesday, June 05, 2002 9:25 AM
To: Access
Subject: [access] RE: Auto scoring


George,

I am a real beginner in access.  I haven't written code at all in this
database.  it is all done with macros.  As for the score, the test is a
multip0le choice test.  I would like the right answer to be worth 1 and an
incorrect answer a 0.  I really woould appreciate any help you could give,
also I would appreciate any info on VB code writing. I want to learn how to
do that.

Thank You.

Kirk

-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Wednesday, June 05, 2002 9:14 AM
To: Access
Subject: [access] RE: Auto scoring


Kirk,
After your print command code add this line to exit the database after
printing: 
doCmd.Quit

What is the basis of your score?

Cheers,
George



-----Original Message-----
From: Wallace, Kirk T SSgt [mailto:kirk.wallace@S...]
Sent: Wednesday, June 05, 2002 5:49 PM
To: Access
Subject: [access] Auto scoring


I have a problem trying to get Access to do what I want. I was hoping someon
out there could help.

I wrote a test in access.  Once the students are done with the test the
database prints out a report of there answers and then closes the report
automativcally.  I want a couple of other things to happen though.  I would
like to be able to have the database automatically score the test and I want
the whole access databse to close when it is done printing.  i want NO user
intervention so I can keep people honest.  If anyone can help I would
appreciate it.

Kirk Wallace

Staff Sergeant Wallace, Kirk T
Marine Detatchment, Fort Sill
MAEMC Instructor





Message #8 by joe.dunn@c... on Wed, 5 Jun 2002 16:01:38 +0000
If you can e-mail your database to me (keep it as small or possible and
compact before zipping it), I will send you back a solution. You can not
send attachments through P2P.WROX.com so send it directly to me using

joe.dunn@c...


*************************************************************************

This e-mail may contain confidential information or be privileged. It is intended to be read and used only by the named
recipient(s). If you are not the intended recipient(s) please notify us immediately so that we can make arrangements for its return:
you should not disclose the contents of this e-mail to any other person, or take any copies. Unless stated otherwise by an
authorised individual, nothing contained in this e-mail is intended to create binding legal obligations between us and opinions
expressed are those of the individual author.

The CIS marketing group, which is regulated for Investment Business by the Financial Services Authority, includes:
Co-operative Insurance Society Limited Registered in England number 3615R - for life assurance and pensions
CIS Unit Managers Limited Registered in England and Wales number 2369965  - for unit trusts and PEPs
CIS Policyholder Services Limited Registered in England and Wales number 3390839 - for ISAs and investment products bearing the CIS
name
Registered offices: Miller Street, Manchester M60 0AL   Telephone  0161-832-8686   Internet  http://www.cis.co.uk   E-mail
cis@c...

CIS Deposit and Instant Access Savings Accounts are held with The Co-operative Bank p.l.c., registered in England and Wales number
990937, P.O. Box 101, 1 Balloon Street, Manchester M60 4EP, and administered by CIS Policyholder Services Limited as agent of the
Bank.

CIS is a member of the General Insurance Standards Council

CIS & the CIS logo (R) Co-operative Insurance Society Limited

********************************************************************************
Message #9 by "Amy Wyatt" <amyw@c...> on Thu, 6 Jun 2002 14:20:16
I also could help if you wish. If your database contains information you 
cannot forward, create a db that only contains your tables and forms for 
the test by opening a new database and importing the objects into the new 
database from the old. Then you can clear out any 'sensitive data' from 
the tables (the structure is more important). Then use the Tools>Database 
Tools> Compact and Repair to compact the database for emailing. It is best 
if you also zip it as Norton does not like .mdb's because of potential 
viruses.

If you want to do this and send it to me, feel free. I am in a sort of 
lull right now so I could lend assistance if you wish.

As for learning to code in Access, be sure if you obtain a book that it is 
on VBA no VB. Access uses VBA and there are subtle differences between the 
two languages.

My direct email is amyw@c... if you want me to take a look at 
the DB.

Good Luck,

Amy

> I have a problem trying to get Access to do what I want. I was hoping 
someon
out there could help.

I wrote a test in access.  Once the students are done with the test the
database prints out a report of there answers and then closes the report
automativcally.  I want a couple of other things to happen though.  I would
like to be able to have the database automatically score the test and I 
want
the whole access databse to close when it is done printing.  i want NO user
intervention so I can keep people honest.  If anyone can help I would
appreciate it.

Kirk Wallace

Staff Sergeant Wallace, Kirk T
Marine Detatchment, Fort Sill
MAEMC Instructor


  Return to Index