easy question, please help

ice-9

Registered User.
Local time
Today, 09:45
Joined
May 21, 2004
Messages
88
How do i call a existing query and use its fields.

i have the following

Code:
Dim cnn As ADODB.Connection
Dim rs As New ADODB.Recordset
Set cnn = CurrentProject.Connection
rs.Open "CountFollowups", cnn


CountFollowups is my query.
But i keep getting the error 3001. Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
 
ice-9 said:
i have the following

Code:
Dim cnn As ADODB.Connection
Dim rs As New ADODB.Recordset
Set cnn = CurrentProject.Connection
rs.Open "CountFollowups", cnn

Try

Code:
rs.Open "SELECT * FROM CountFollowups", cnn

I believe you need a valid SQL statement for this to work
 

Users who are viewing this thread

Back
Top Bottom