Psychobabble
Registered User.
- Local time
- Today, 23:11
- Joined
- Apr 26, 2003
- Messages
- 13
I'm trying to create command button which will select and go to a random record in my form and my VB is woefully inadequate. Here's what I've got so far:
Dim rndRecord As Integer
rndRecord = Int((100 * Rnd) + 1)
DoCmd.GoToRecord , , acGoTo, rndRecord
This script will picks a random record between #0 and #100 no problems. Now what I'd like to is change that 100 to the number of records in the database (called "cases"). Anyone know how to do that?
Dim rndRecord As Integer
rndRecord = Int((100 * Rnd) + 1)
DoCmd.GoToRecord , , acGoTo, rndRecord
This script will picks a random record between #0 and #100 no problems. Now what I'd like to is change that 100 to the number of records in the database (called "cases"). Anyone know how to do that?