Chapter Program Math Quiz

The Math Quiz program in Figure 4.7 is a fun way of learning how to incorporate chapter-based concepts such as loops, random numbers, and list boxes into your VBA applications.

The program prompts a user for the number of math questions she would like to answer. Then, Math Quiz prompts the user with a predetermined number of addition questions using random numbers between 1 and 100. A list box with columns stores each question, the user's response, and the result.

Controls and properties to build the Math Quiz program are described in Table 4.2.

All of the code required to build Math Quiz is seen next.

Option Compare Database Option Explicit

Private Sub Form_Load()

Randomize End Sub

Using chapter-based concepts to build the Math Quiz program.

C Microsoft Access - [Chapter Program]

^jnjjij j§] File Edit View Insert Format Records lools Window Help - B x

Chapter 4 - Math Quiz


0 0

Post a comment