Can I open a Select Query as a Record Set?

B

Bill Johnson

Is this supposed to work? I'm trying to perform an
operation in VB code based on the results of a Select Query

rst1.Open "SELECT * FROM qryFSAgingDetail", cnn,
adOpenForwardOnly, adLockReadOnly

The select query includes fields from three tables.

I'm getting an error :

"No value given for one or more parameters"
"Error Number" -2147217904

I'm thinking my use of a query is the most likely reason.
 
D

Douglas J. Steele

No reason it shouldn't work. Does qryFSAgingDetail work by itself? Does it
require parameters?
 
B

Bill Johnson

That might be it,

The Select Query uses a field from a form, but even so,
the form is open and available for the query to get it's
value when I'm running the code....
 
G

Guest

I removed where my query was asking for a value from a
form and that seemed to correct THAT error. Thank you!

Moving forward to the next. :)
 

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