[AccessD] Random ina query

Jim Dettman jimdettman at verizon.net
Mon May 18 09:40:44 CDT 2009


Gustav,

  Wow, never realized that and there doesn't seem to be any real work around
either.  I had thought that modifying the column definition with something
like:

  Rnd([ID])*Now()  

  but even that doesn't do it.  Looks like the only way to truly solve this
is with Randomize() in a UDF.

Jim. 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Friday, May 15, 2009 1:14 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Random ina query

Hi Jim

But you forgot to close and relaunch Access - that's the trap.

If you do so, not only the first run (run 1) but every run (run n) of the
query will be identical to run 1 and run n of the query of any previous
session.

/gustav


>>> jimdettman at verizon.net 15-05-2009 19:02:42 >>>

gustav,

  Well I just tried it here and it works fine.  On a table of 16,000
records, I asked for the top 5 and I got a different set of five records no
matter how many times I executed the query.

Jim.



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list