Solved

Access form for test

Posted on 2010-09-03
7
935 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

744 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

11 Experts available now in Live!

Get 1:1 Help Now