Solved

Access form for test

Posted on 2010-09-03
7
945 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

756 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