S
Simon
Hi, I can't figurout anymore how to use querys in a module.
I am using access 97 and I don't understand what I am
doing wrong. here is my code:
Dim fDatabase as databse
dim query as querydef
dim record as recordset
set query = fDatabase.queryDefs("query")
query.Parameters(0) = date1
query.Parameters(1) = date2
set record = query.openrecordset(dbOpenDynaset, dbReadOnly)
when I debug the query it has only 1 record in it but in
access when I double click the query and input the
parameters it has 104 entries.
so I can't work with the query with query.moveNext because
it has always 1 record in it.
I can't figure out what I am doing wrong
thanks a lot
Simon
I am using access 97 and I don't understand what I am
doing wrong. here is my code:
Dim fDatabase as databse
dim query as querydef
dim record as recordset
set query = fDatabase.queryDefs("query")
query.Parameters(0) = date1
query.Parameters(1) = date2
set record = query.openrecordset(dbOpenDynaset, dbReadOnly)
when I debug the query it has only 1 record in it but in
access when I double click the query and input the
parameters it has 104 entries.
so I can't work with the query with query.moveNext because
it has always 1 record in it.
I can't figure out what I am doing wrong
thanks a lot
Simon