Help!

I would like to design a custom form as follows:

My software is Access 2007

Three columns of 12 rows each are needed. One for num1, 1 for num2, and a third named diffSet.

The DiffSet column will contain 12 constant numbers of any arrangement.

I am unable to get my form to show the columns of numbers. Anyone have any idea how to do this?

Thanks

Option Compare Database

I would like to design a custom form as follows:

My software is Access 2007

Three columns of 12 rows each are needed. One for num1, 1 for num2, and a third named diffSet.

The DiffSet column will contain 12 constant numbers of any arrangement.

I am unable to get my form to show the columns of numbers. Anyone have any idea how to do this?

Thanks

Option Compare Database

Code:

Sub Unique_Numbers() Dim x As Long, y As Long, z As Long, tempnum As Long, Tempnum2 As Long Dim flag As Boolean Dim i As Integer x = 50 y = 660 z = 11 If z = 0 Then Exit Sub If z > 50 Then z = 50 If z > y - x + 1 Then Exit Sub End If Randomize num1 = Int((y - x + 1) * Rnd + x) num2 = num1 - DiffSet For i = 13 To z + 13 Do flag = False Randomize tempnum = Int((y - x + 1) * Rnd + x) Tempnum2 = tempnum - DiffSet If Tempnum2 < 50 Then flag = True Loop Until Not flag num1 = tempnum num2 = Tempnum2 Next End Sub

*Last edited by shabbir; 15Oct2009 at 10:18.. Reason: Code blocks*