Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

Random test

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul (OMAC HX) - 12 Jan 2008 15:29 GMT
Hi ,

I am wondering is it possible to set up a database where i can keep adding
questions to a table and then print out a random test from the questions
entered. like 30 random questions out of the database and thenprint them.

Also ifthis can be done what way would it have to be laid out soicould
alsogive the wuestion and 4 multiply choice answers with it also.

Thanks for any helpwith this

PAul

Signature

paul@partydj4hire.com

Arvin Meyer [MVP] - 12 Jan 2008 16:15 GMT
Add this function to a standard module:

Function Randomizer () As Integer
Static intPicked As Integer
   If intPicked = False Then Randomize : intPicked = True
Randomizer = 0
End Function

Then use the ID column which is numeric and unique. So 30 questions picked
at random would be:

Select Top 30 * From tblMyData
Where Randomizer() = 0
Order By Rnd(isnull(tblMyData.ID) * 0 + 1)
Signature

Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

> Hi ,
>
[quoted text clipped - 8 lines]
>
> PAul
Tom van Stiphout - 12 Jan 2008 16:19 GMT
On Sat, 12 Jan 2008 15:29:18 -0000, "Paul \(OMAC HX\)"
<paul@www.omachx.com> wrote:

Here is an article about creating a query that returns random records:
http://www.mvps.org/access/queries/qry0011.htm

-Tom.

>Hi ,
>
[quoted text clipped - 8 lines]
>
>PAul
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.