By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,928 Members | 1,210 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,928 IT Pros & Developers. It's quick & easy.

Help with querydef and parameter query

P: n/a
I use the following snippet to open a build a querydef. This works
great with a query that has a parameter that points to a form, but if I
try to use it in a parameter query, even if the parameter is defined I
get the following error

2482 Access cant find the name 'enter year' you entered in your
'This is the code snippet I use to open see below for an example of
the query that will not work.

strSQL_a = "Select * from [" & query_name & "]"
qdf_a.SQL = strSQL_a

'Loop through all query parameters
For Each prm In qdf_a.Parameters
prm.Value = Eval(prm.Name)
Next prm

Set A_rs = qdf_a.OpenRecordset

'Query that will not work
PARAMETERS [enter year] Short;
SELECT tblDetail.*
FROM tblDetail
WHERE (((tblDetail.YEAR)=[enter year]));

May 11 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.