bleakcabal
Registered User.
- Local time
- Today, 09:29
- Joined
- Mar 19, 2002
- Messages
- 12
Hi, I have a problem with an access application. What I want to do is create a recordset and instead of doing what I am currently doing :
I want to specify an existing query in the database as the source of the recordset. I have tried several methods myself including doing
and
Or just putting the query name instead of my string and all methods give me the following error : Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
The query I use returns rows in query source and just to be sure it works I have created a sample report which uses this query as it's source property and everything works fine.
Thanks in advance for any kind of help you may give and if you need any clarifications just ask.
Code:
Dim rsProduits As New Recordset
stQuery = "SELECT * FROM Produits WHERE " &
WHEREClause & " ORDER BY NoSousCategorie;"
rsProduits.Open stQuery, CurrentProject.Connection, 3, 3
I want to specify an existing query in the database as the source of the recordset. I have tried several methods myself including doing
Code:
rsProduits.Open QUERYNAME, CurrentProject.Connection, 3, 3, 2
and
Code:
rsProduits.Open QUERYNAME, CurrentProject.Connection, 3, 3, 1
Or just putting the query name instead of my string and all methods give me the following error : Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
The query I use returns rows in query source and just to be sure it works I have created a sample report which uses this query as it's source property and everything works fine.
Thanks in advance for any kind of help you may give and if you need any clarifications just ask.