How Can I Remove two random buttons

ok thats fine but what is the folder setup for pictures as i have tried

picture or pictures

as it faults as cant load Slovakia flag picture

sorry also rather than dp ill edit this

on my results form it dosent work as its no longer checking for Q1,Q2,Q3 etc so i changed it to

Code:
=DCount("[Correct]","TblResult","[Correct] = True" & " AND [Person] = '" & [Forms]![F_Start]![txt_UserName] & "'")

and doesnt quite work as i cleared the results and dosent add up correct
 
Last edited:
ok thats fine but what is the folder setup for pictures as i have tried

picture or pictures

as it faults as cant load Slovakia flag picture

sorry also rather than dp ill edit this

on my results form it dosent work as its no longer checking for Q1,Q2,Q3 etc so i changed it to

Code:
=DCount("[Correct]","TblResult","[Correct] = True" & " AND [Person] = '" & [Forms]![F_Start]![txt_UserName] & "'")

and doesnt quite work as i cleared the results and dosent add up correct

i have managed to fix the flag issue ater a long google found out i was supposed to put the path to the image in the table

but if you can help with the final score that would be great
 
Here is the database.
 

Attachments

Here is the database.

amazing thank you, that is also a lot less code in the dcount one thing i have noticed from the attached you can see as well

that if you even give the correct answer as i was doing it puts the wrong choice ??
 

Attachments

  • ok why.png
    ok why.png
    33.6 KB · Views: 67
OK

after i had completed the quiz and asnwerd each right( as i set the questions) as wanted to see add it all up to grand total

but was only showing 2 right and then when i checked the tblresult it was showing choices i hadnt picked
 
Is it running okay now?
Else explain how you get a wrong result, (step by step), so I can test it!
 
OK step by step with photos as well

I open the database as the end user would no holidng shift or anything

so i enter my name, for this was joe blogs

and choose set 1 for questions and then start and go through each question and as you can see from each picture i got each one right ( clever old me :D )

but then when i get to the results it only said i had got 2 right

so then i went to the admin and checked the table and as you can see this is what has been stored ?
 

Attachments

  • 1correct.png
    1correct.png
    25.8 KB · Views: 62
  • 2correct.png
    2correct.png
    32 KB · Views: 62
  • 3correct.png
    3correct.png
    25.7 KB · Views: 62
  • 4correct.png
    4correct.png
    26 KB · Views: 57
  • 5correct.png
    5correct.png
    27.1 KB · Views: 62
extra pics as 5 is the max
 

Attachments

  • 6correct.png
    6correct.png
    25.9 KB · Views: 60
  • 7correct.png
    7correct.png
    26.2 KB · Views: 58
  • 8correct.png
    8correct.png
    26.1 KB · Views: 54
  • only 2.png
    only 2.png
    44.6 KB · Views: 56
  • results table.png
    results table.png
    62.5 KB · Views: 67
Okay, now I understand, when I do a test and get all right, then the table shows all correct.
Please post the database back, I'll see what the problem is, (posted back because I can't reproduce the problem). :)

attachment.php
 

Attachments

  • QuizResult.jpg
    QuizResult.jpg
    63.1 KB · Views: 158
The problem is that you've change the code in Sub RegisterChoice.
So you call next question before the result get saved, (afterwards you save the result but with wrong data)! :rolleyes:
Mark with red is what you've put in.
Code:
Private Sub RegisterChoice(TheChoise As Control)
  Dim x As Integer
  'Find out if a choise is right or wrong, show a message
  If TheChoise.Tag Then
    MsgBox ("Well Done, That Is Correct!")
[B][COLOR=Red]    RememberQuestionNo = RememberQuestionNo + 1
    Call GetQuestion
[/COLOR][/B]  Else
    MsgBox ("Sorry, That Is NOT Correct!")
[B][COLOR=red]    RememberQuestionNo = RememberQuestionNo + 1
    Call GetQuestion
[/COLOR][/B]  End If
  'Save the choise and other relevant data
  ...
End Sub
So all in all clear it doesn't compose the right result. :D
Put the 2 codelines you've added to the very end of the sub, that will do it.
 
Last edited:
trust me to try and be cleaver and go and break it

but thanks a lot for your help :)
 
You're welcome, good luck with the quiz! :)
Just one point, I would store the attachment to a question, either in same directory or in a sub directory to the database/question and then find/calculate the location by code, instead of storing the whole path in the table. Because it would be more flexible!
 
ok ta for that one last thing i promise on this subject

when you open the database in the drop down box where you select the question set it states number 2 as well as 1

but i have no number 2 ( no laughing back there )
 
In the form F_Start OnOpen event, you can set it to 1 or remove the code line:
Code:
Private Sub Form_Open(Cancel As Integer)
...
  [B][COLOR=Red]Me.QuestionRoundNo = 2[/COLOR][/B]
End Sub
:)
 
Been a while but just wheeled this out and some one asked could it be made so that the questions move around.

not as in bounce around the screen, but as in the right questions isn't always in the same place

current version attached, also i haven't implemented the function suggested by JHB about storing of attachments for the flags ( ill do this soon )
 

Attachments

Add another column with data type SINGLE and load four random values generated at the time the question is chosen. Display the questions in the order of the random values.
 
Add another column with data type SINGLE and load four random values generated at the time the question is chosen. Display the questions in the order of the random values.

OK that sounds like a simple solution just a few questions

would the code look something like this ( pusdo for now don't judge )

Code:
when you press start, single in question table equal rndm, select choise in descending order on SIngle
 
That seems to be the idea I was heading for. Just remember, this would be a different random number than would be used for the "remove two numbers randomly" situation. The good news is that a SINGLE is only 4 bytes per record, fairly cheap in terms of storage and unlikely to put a strain on anybody's computer for processing.
 

Users who are viewing this thread

Back
Top Bottom