Something missing in my query?

  • Thread starter Thread starter ake
  • Start date Start date
A

ake

I have created a query that will randomly select a "quote" from a table. I
also made it appear in a startup form.My problem is that whenever I open the
form the same message appears. I want a different message whenever I open the
form. Please help me do this. I know I'm missing just one thing here and I
can't figure it out.
I entered the following SQL in my table:

SELECT TOP 1 [tblQuotes].[Message], Rnd([Auto]) AS Expr1
FROM tblQuotes
ORDER BY Rnd([Auto]);
 
I have created a query that will randomly select a "quote" from a table. I
also made it appear in a startup form.My problem is that whenever I open the
form the same message appears. I want a different message whenever I open the
form. Please help me do this. I know I'm missing just one thing here and I
can't figure it out.
I entered the following SQL in my table:

SELECT TOP 1 [tblQuotes].[Message], Rnd([Auto]) AS Expr1
FROM tblQuotes
ORDER BY Rnd([Auto]);

Answered elsewhere.
Please do not multi-post. If you feel you must post the same question
to more than one newsgroup (and it's seldom necessary), crosspost by
adding each additional newsgroup in the To Newsgroups: box, separated
by a comma.
This way an answer in one newsgroup will be seen in each of the
others. More readers will see the response and learn, and less time
will be spent on duplicate answers.

See Netiquette at http://www.mvps.org/access

It's a great site to visit anyway.
 
Back
Top