Hello all,

I'm currently working on an assignment and the directions are as follows:

"Create a form in MS Access to gather the results of 50 coin flips. Obviously, each coin flip results in either a “head” or “tails”.

Include on this form two buttons. One button, when clicked, will display the percentage of flips which resulted in Heads. You can display that with a message box or a text box on the form. The second button displays a pie chart showing the percentages of heads and tails."

I'm having a lot of trouble with this. So far - I have written a VBA Code for the coin flips function, but don't know what else to do from here.

Here is the code:

Dim dblRandomNumber As Double
Randomize
dblRandomNumber = Rnd
If dblRandomNumber >= 0.5 Then
     Form_Form1.Text1 = "H"
     Else
     Form_Form1.Text1 = "T"
     End If
I don't know where to go from here. Please help!!