Click to See Complete Forum and Search --> : Displaying Random Records


dirt29
06-12-2006, 10:59 AM
I'm trying to make it so I can display a random product from our DB. What is the easiest way to get a record count and then have it select a random record and be displayed?

chrismartz
06-12-2006, 04:25 PM
Try someting like this:Randomize()
intNum = Int(intHighestNumber * Rnd) + 1
strSQL = "SELECT column FROM table_name WHERE id = intNum"