trying to make a program failing

jdwazere

Registered User.
Local time
Today, 06:42
Joined
Feb 17, 2007
Messages
22
well i am trying to make a very simple program that would help me learn the capitals of each country. yes it is a weird thing to do but i just it might help.
anyway i started doing it using access and made a table with three columns primary key number, country and capital.
I started making a form and im tryin to make it so the program would randomly pick a country and i would have to choose from a list box the capital and i would have a command button which when i click will tell me if i am right or not and if i am not then it would say the right capital.
How should i do this?
p.s ino the basics of using the code builder
help much appreciated.
 
Here you go. The table t_Capitals contains the setup for you. The form f_Main will quiz you.

I've put in dummy countries 1 to 10, and they match dummy capitals 1 to 10, as in the capital of Country 1 is Capital 1, and so on. Answer correctly and it will say correct. Answer incorrectly, and it will tell you incorrect and provide the correct answer. Click on New Question to randomly generate a new country/capital pair.

EDIT: I decided my nephew could use this, so I made it legitimate. It now includes all the world's countries and capitals, and it will identify the region (Europe, Asia, etc.) and then limit the possible answers to those regions. The rest of it is functionally the same.

HTH
 

Attachments

Last edited:
Moniker-
Great little program there! I modified it slightly for my use by putting
Code:
cmdNewQuestion_Click
in the form's OnLoad event so that there is a question right away without a blank.

This will be cool to let my kids use too.

Thanks again!
 
Glad you found it of use. :) Good modification too. I went ahead and made your modification to the linked version above and I forced f_Main to open when the DB opens.

EDIT: Changed it so that the randomizer will handle any number of country/capital entries. I had it hard-coded to 198. It now counts the number of entries in t_Captials and uses that as the upper limit on the randomization.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom