Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Rouding up totals.

JohnWesleyJohnWesley Member Posts: 20
I am creating a database that will allow users to undergo a series of test cut into sections. The test will simulate that of the CSCS Card Training, which here in england is like a certificate that allows workers on a construction site, it is now mandatory.

I have the first set of questions in the database and also a feature to add users. Using a query and creating a form I have managed to allow the user to take the test, however I would like to be able to count the number of correct answers and give them some output as to how they have done, for example compare the users given answers with the correct answers within the question table and then give them a "correct answers", "out of", "pass percent" type record...

I am not sure if I could or would implement this as they take the test, or on the same form when they get to the end of the section,...

if it is relevant, here is my code for the test to be taken...

In case it is relevent here is the code to take the test...

If IsNull(lbTestSections) Then
MsgBox "Please select a section"

Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("select * from tblSessionSummary where [userid] = '" & [UserID] & "' AND [sectionnumber] = " & lbTestSections)

If Not rst.EOF Then
MsgBox "This section has been done already"
rst![UserID] = [UserID]
rst![SectionNumber] = [lbTestSections]
rst!Date = Date

Dim rst2 As Recordset, rst3 As Recordset
Set rst2 = CurrentDb.OpenRecordset("select * from tblquestions where sectionnumber = " & lbTestSections)
Set rst3 = CurrentDb.OpenRecordset("tblSessionAnswers")

While Not rst2.EOF
rst3![UserID] = [UserID]
rst3!SectionNumber = lbTestSections
rst3!QuestionNumber = rst2![QuestionNumber]

End If

DoCmd.OpenForm "frmQ_A", acNormal, "userid = '" & [UserID] & "' AND section = " & lbTestSections

...They are now faced with a form that displays the section number, the questions and gives them means to answer before using the record selectors to go to the next question.

I would appreciate any help on how I would do this.
Thanks alot.

It is possible for me to send the database, as it is so far, for anyone to look at if they wish.

thanks again.
Sign In or Register to comment.