Solved

Access form for test

Posted on 2010-09-03
7
941 Views
Last Modified: 2012-05-10
Good afternoon expert,

Created an exam simulator using Javascript to study for an exam called ITIL (Info Technology Infrastucture Library)
It works well but it would work better if
1. The questionsa were in different order every time I opened the Exam form.
2. The answers to the questions were in different order every time I opened the Exam Form

That is, Question 2 would be question 5 the next time I open it. And answer one to question 5 would be answer three to question 5 the next time the test is opned.

Finally the form attached displays the four possible answers. How could I put a button or user controlled event handler that would display the correct answer?

I know this is a lot of questions but if you could just give me the concept I think I can fidgure it out.
Or if you want me to I could rework it into a series of questions.

Thanks.

Allen in Dallas
ITIL-test.mdb
0
Comment
Question by:9apit
  • 3
  • 2
  • 2
7 Comments
 
LVL 10

Expert Comment

by:Michael Vasilevsky
ID: 33599120
You'll need to use and unbound form instead of a bound form and populate the controls randomly...
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33599152
test this


ITIL-test.mdb
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33599175
the file uploaded is to show the answer.. as far as the other question see mvasilevsky comment
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 10

Expert Comment

by:Michael Vasilevsky
ID: 33599211
Example attached. Try opening the frm_Test a few times and look at the On Open event VBA code
HTH,

MV
ITIL-test.zip
0
 

Author Comment

by:9apit
ID: 33599271
Hello mvasilevsky:
Well maybe I over estimated ny abilities in saying that I could figure it out.
I read about unbound controls is that the same an unbound form?
If so then how does one get the recordset into the form if it is not bound
to the data
'Unbound control  A control that doesn't have a source of data (such as a field or expression) is called an unbound control. You use unbound controls to display information, lines, rectangles, and pictures. For example, a label that displays the title of a form is an unbound control.'

Thanks.

Allen in Dallas
0
 

Author Comment

by:9apit
ID: 33599559
Hello mvasilevsky:

I thnik I see where you are going. Although there are two forms in the MDB sent one
is the form I did and the other when clicked oin returns
Run-time error '-2147217838 (80040e52)
Data source object is already initilaized'
But I could open the VBA. It looks like to variables are created.
One, rst,  is the recordset and the other (x) is an interger used to maniplulate
the order of the questions. It looks like x is set to be the rescordset minus
one and plus one. Can't see why you would add one to the interger and
then subtract it.  Then the variable is muliplied times a random number
and incremented. What does that do?
What dos the xpression rst.Move x -1, 1 Do?
What is Me!
Thanks.
Allen in Dallas


0
 
LVL 10

Accepted Solution

by:
Michael Vasilevsky earned 500 total points
ID: 33599901
Make sure you have the Microsoft ActiveX Data Objects 2.1 Library Referenced (Tools -> References)

x is the random number generated to pull a random record.

rst.move x-1, 1 move x-1 records, starting with 1
Me! is a generic reference to the current form, in this case frm_Test

HTH,

MV
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question