let's see if I can explain my request.
in a db I have a table called TBLDOMANDE_VARIE which contains a series of questions divided into three different levels (1, 2 and 3)
a query extracts all the questions related to the chosen level (level 1, 2 or 3). here it is
Code: Select all
put "SELECT DOMANDA, NUM from TBLDOMANDE_VARIE WHERE LIVELLO = '"& tNumLiv &"' " into tSQL
put revDataFromQuery(tab,return,tDatabaseID,tSQL) into tRecords
NUM is the number which identifies the question
LIVELLO is the number of the selected level
after that, I select randomly 1 of the questions contained in the recordset created by the query, so:
Code: Select all
put any line of tRecords into tDom
set ItemDel to TAB
put item 1 of tDom into field "txtDomanda"
Now I would like to avoid the possibility of reproposal the same question. I was thinking something like this:
- store in some way the numbers of the questions.
- verify that the number of randomly picked question does not already exist in this list (array?)
- in case extract another question.
- if all numbers are in the list (which means that all the questions have been asked), end the loop.
any help is welcome
ciao
franco