string syntax

S

smk23

Is there something wrong with this line? strSQL is a string

strSQL = CurrentDb.QueryDefs("pqQuickSearch").SQL

Error is "property not supported"
 
S

smk23

I think it has something to do with the connection string being open or
closed. Is there a way to determine if the connection is open that I could
display in a msgbox? The line to open the connection immediately precedes
this. I don't get the error when I close and re-open the app. But the 2nd
time through the error occurs.
 
D

Dirk Goldgar

smk23 said:
Is there something wrong with this line? strSQL is a string

strSQL = CurrentDb.QueryDefs("pqQuickSearch").SQL

Error is "property not supported"

Looks fine to me, and it works in my database with my query. Are you
sure that's the line that's raising the error?
 
D

Dirk Goldgar

smk23 said:
I think it has something to do with the connection string being open
or closed. Is there a way to determine if the connection is open that
I could display in a msgbox? The line to open the connection
immediately precedes this. I don't get the error when I close and
re-open the app. But the 2nd time through the error occurs.

What connection string? Where does a connect string come into this?

Maybe you'd better show the surrounding code and give some background.
 
S

smk23

that's actually very helpful because I know to move on. That line isn't the
problem. Appreciate it. Will post back when I have an intelligent question.
Thanks
 
Top