English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i think it has something to do with the Rnd() function. please tell me what i must use as the input mask, default value, etc.

2006-09-22 06:25:32 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

In Access use the Rnd Function. You can specify here how many digits you want by incorporating it in your formula. The formula should be as follows:

Int ((999999999 - 1 + 1) * Rnd + 1) would return a random number between 1 and 999999999

Int stands for the type of number. The 999999999 would indicate a 9 digit number which you requested. The -1 indicates the lowest number in your values as well as the +1 at the end of the formula. The rest of the formula allows you to generate a random number.

So if you wanted to generate a number between 2 and 8 your formula would be
Int ((8-2+1) *Rnd +1)

2006-09-22 07:30:02 · answer #1 · answered by Anonymous · 0 0

take a glance at Math.random(). it rather is going to create a random quantity in variety of [0,a million) ie: from 0 to a million yet no longer alongside with a million. right this is an occasion of a thank you to apply it: //creates a random quantity between one thousand to 9999 int x = (int)(Math.random() * 9999)+one thousand i does no longer use this methodology for cryptography applications, even yet it rather is super for common familiar use. reliable luck

2016-12-12 13:02:21 · answer #2 · answered by ? 4 · 0 0

multiply r n d() function by

highest number-lowest number+1

999 999 999-100 000 000 +1

that is multiply by
900 000 000

then add the lowes number which is 100 000 000

2006-09-22 06:31:04 · answer #3 · answered by iyiogrenci 6 · 0 0

fedest.com, questions and answers