Wait Form - Add Quote of the Day

  • Thread starter Thread starter Pasha
  • Start date Start date
P

Pasha

I have a database with many different reports and data, therefore, whe
users select something from the drop down menu on the main form, I hav
"Wait" form that simply says "Please wait". I would like to add a cod
generating a random quote from the list of lets say 50 of them (o
whatever I can find). Any ideas how this can be done

Pash
 
online help will answer this for you search for "random"
Generate a random number, and multiply it by 100 or whatever gives you a
value under 1000, then round it off to an integer. Compare that value to the
numbers 1 to 50 where 50 is the top value in the key field of the quote
table.
Use a loop to generate random numbers until one is between 1 and the max
numberof the key field. Once a number is matched exit the loop and use that
number in the where clause of the open form command to open a random quote.
HTH
 
Back
Top