Parameter Query that does not prompt

B

bnhcomputing

I have created a simple parameter query. What I would like to do is:

SELECT * FROM QUERY1(param1=2008) and get back the data for year
2008.
SELECT * FROM QUERY1(param1=2007) and get back the data for year
2007.

The problem is, it ASKS for the year, is there a way to actually pass
in the year whithout making a form?

Thanks in advance
 
A

Allen Browne

The alternative to creating a form is to dynamically generate the SQL string
instead of asking for a parameter, e.g.:
iYear = 2008
strSql = "SELECT Query1.* FROM Query1 WHERE TheYear = " & iYear
 

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