PDA

Click to See Complete Forum and Search --> : Adding random numbers to a field


Clunietp
Jan 8th, 2000, 12:13 AM
code for random, 1 - 2 digit whole numbers:

Dim tmp As Long

Randomize

tmp = Rnd() * 100

Debug.Print tmp


just take tmp, and add it to a field in a current recordset (RS)

rs.fields("MyField").value = rs.fields("MyField").value & tmp


HTH

Tom

John Long
Jan 8th, 2000, 11:53 AM
Is it possible to add a random number to the end of a field? If so what is the easiest way?

John