Something missing in my query?

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]);
 
F

fredg

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top