I don't think there's a built in function for it in Access, but you can
always create a function in VB and use it wherever you wanted.
Function fRandom(LowNumber As Double, HiNumber As Double) As Integer
fRandom = Int((HiNumber - LowNumber) * Rnd + LowNumber + 1)
End Function
Then use
=fRandom(1000,9999)
as your default value.
It's much easier to just use the random AutoNumber type for the field, but
it won't limit it to a 4 digit number.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.