Solved

Access form for test

Posted on 2010-09-03
7
938 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 119

Expert Comment

by:Rey Obrero
ID: 33599152
test this


ITIL-test.mdb
0
 
LVL 119

Expert Comment

by:Rey Obrero
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
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…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

864 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now