Ummm?
Code:
string newUrl = String.Format("/details?id={0}",GetMyRandomNumber());
Response.Redirect(newUrl);
Assuming you're having trouble with the random number, not the redirect, something like this:
Code:
private int GetMyRandomNumber()
{
int randomNumber = 0;
Thread.Sleep(1); //(bounces the clock a bit to jig the Random number)
Random rand = new Random();
randomNumber = rand.Next(0,myTableAdapter.count())
return randomNumber;
}
This is off the top of my head, so don't just paste it into some code, it almost certainly won't work. Also, I'm not really familiar with Dataadaptors, it's the kind of thing I look up when I need to (rarely). So it might have .length() instead of .Count() etc, or you may even have to iterate through the rows to count them, I have no idea 
you'll need to add "using System.Threading;" to the top of your file or else the little thread.sleep bit won't work. Or you could just leave that statement out, it's not really vital.
Next up, Access?
I mean, do you have to? Couldn't you use SQL server express instead? Or MySQL? Or anything in fact that isn't Access?
Lastly, if you're at Uni, are you using the grown up Visual Studio 2005, or the Express version?