I've got the following (simple) code put under a button
Private Sub random_Click()
Dim MyValue
Me![numbera] = 0
Me![randomdate] = Date
Me![randomtime] = Time()
MyValue = Int((2 * Rnd) + 1) ' Generate random value between 1 and 2.
Me![numbera] = MyValue
It works like it should, but the problem is that when I clicked it 120 times the distribution was 70 to 50. Is there a way to make sure that the distribution of the number is max 45 to 55 when dealing with about 100 randomized records?
Thanks M.
Private Sub random_Click()
Dim MyValue
Me![numbera] = 0
Me![randomdate] = Date
Me![randomtime] = Time()
MyValue = Int((2 * Rnd) + 1) ' Generate random value between 1 and 2.
Me![numbera] = MyValue
It works like it should, but the problem is that when I clicked it 120 times the distribution was 70 to 50. Is there a way to make sure that the distribution of the number is max 45 to 55 when dealing with about 100 randomized records?
Thanks M.