Can I use RANDBETWEEN on a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use RANDBETWEEN on a report to establish a random number in a
text box and I get an #error. The msowcf.dll file is installed and I'm not
sure how I can establish a random number other than Rnd() which gives me a
0.###### which I don't want the 0.!

Any ideas,
Thanks in advance.
 
What range of numbers do you want? You can always use an expression like:
Int(Rnd([OrderID])*31)+5
 
Thank you, I ran across the same solution while I was waiting for a response
and I used it like this:
Int((9999-1000+1)*Rnd()+1000), I belive this is all numbers between high
9999 and low 1000, which seems to do the trick. If you see any problems with
it let me know.


Duane Hookom said:
What range of numbers do you want? You can always use an expression like:
Int(Rnd([OrderID])*31)+5

--
Duane Hookom
MS Access MVP


teddybear said:
I am trying to use RANDBETWEEN on a report to establish a random number in
a
text box and I get an #error. The msowcf.dll file is installed and I'm
not
sure how I can establish a random number other than Rnd() which gives me a
0.###### which I don't want the 0.!

Any ideas,
Thanks in advance.
 
I'm not sure why you don't replace (9999-1000+1) with 9000.

--
Duane Hookom
MS Access MVP


teddybear said:
Thank you, I ran across the same solution while I was waiting for a
response
and I used it like this:
Int((9999-1000+1)*Rnd()+1000), I belive this is all numbers between high
9999 and low 1000, which seems to do the trick. If you see any problems
with
it let me know.


Duane Hookom said:
What range of numbers do you want? You can always use an expression like:
Int(Rnd([OrderID])*31)+5

--
Duane Hookom
MS Access MVP


teddybear said:
I am trying to use RANDBETWEEN on a report to establish a random number
in
a
text box and I get an #error. The msowcf.dll file is installed and I'm
not
sure how I can establish a random number other than Rnd() which gives
me a
0.###### which I don't want the 0.!

Any ideas,
Thanks in advance.
 
Now that you say it... me either, just followed the example not thinking.
Thanks for your help!

Duane Hookom said:
I'm not sure why you don't replace (9999-1000+1) with 9000.

--
Duane Hookom
MS Access MVP


teddybear said:
Thank you, I ran across the same solution while I was waiting for a
response
and I used it like this:
Int((9999-1000+1)*Rnd()+1000), I belive this is all numbers between high
9999 and low 1000, which seems to do the trick. If you see any problems
with
it let me know.


Duane Hookom said:
What range of numbers do you want? You can always use an expression like:
Int(Rnd([OrderID])*31)+5

--
Duane Hookom
MS Access MVP


I am trying to use RANDBETWEEN on a report to establish a random number
in
a
text box and I get an #error. The msowcf.dll file is installed and I'm
not
sure how I can establish a random number other than Rnd() which gives
me a
0.###### which I don't want the 0.!

Any ideas,
Thanks in advance.
 
Back
Top