Help us to help you...
In what context do you have the SQL "on the form"? That is, SQL is just a
string of text until you use it some way, and you don't just have strings of
text, SQL or otherwise, "on a form".
What do you want to do with it? Execute it as a standalone SELECT query,
use it as RecordSource for this form, or another form, or a report?
I think the FAQ for the USENET newsgroup comp.databases.ms-access says that
you get the best answers by being detailed, precise, and concise with your
questions. Otherwise, we just have to guess at what you want, and I've done
all the guessing I am prepared to do in re: this question. But, if you'll
explain what you have, and what you want, I will try to answer.