F
Fatz
Hi-
I have the following expression in a query:
Expr1: IIf([PIN #]>49999 And [PIN
#]<60000,Rnd()*(59999-50000)+50000,IIf([PIN #]>=60000 And [PIN
#]<70000,Rnd()*(69999-60000)+60000,IIf([PIN #]>=70000 And [PIN
#]<80000,Rnd()*(79999-70000)+70000,IIf([PIN
#]>79999,Rnd()*(89999-80000)+80000,0))))
What I want this to do is provide me with a new random number for
every record in my table BASED on the value of the record. So if the
current value is >= 50,000 and less than 60,000 I want it to give me a
new random # between those amounts.
This expression works but it gives me the same random number for each
group. I think I should set up 4 modules to house the code for each
group....50,000-60,000, 60,0000-70,000, 70,0000 - 80,0000, and >
80,0000.
Any help would be appreciated! The more detailed the better since I
am a newbie!!
Thanks,
Chris
I have the following expression in a query:
Expr1: IIf([PIN #]>49999 And [PIN
#]<60000,Rnd()*(59999-50000)+50000,IIf([PIN #]>=60000 And [PIN
#]<70000,Rnd()*(69999-60000)+60000,IIf([PIN #]>=70000 And [PIN
#]<80000,Rnd()*(79999-70000)+70000,IIf([PIN
#]>79999,Rnd()*(89999-80000)+80000,0))))
What I want this to do is provide me with a new random number for
every record in my table BASED on the value of the record. So if the
current value is >= 50,000 and less than 60,000 I want it to give me a
new random # between those amounts.
This expression works but it gives me the same random number for each
group. I think I should set up 4 modules to house the code for each
group....50,000-60,000, 60,0000-70,000, 70,0000 - 80,0000, and >
80,0000.
Any help would be appreciated! The more detailed the better since I
am a newbie!!
Thanks,
Chris