I have a query in my Access project called qryFName that I want to use as the source for a recordset. It is a very simple query right now, because I wanted to make sure this would work. When I run this code, I get an empty recordset back. I appreciate any insights into what is happening.
Here is the code I am using:
Code:
Dim rs As New ADODB.Recordset
Dim cnn As New ADODB.Connection
Dim rsCom As New ADODB.Command
cnn = CurrentProject.Connection
cnn.Open
rsCom.CommandText = "qryFName"
rsCom.CommandType = adCmdStoredProc
rsCom.ActiveConnection = cnn
Set rs = rsCom.Execute
If rs.EOF And rs.BOF Then
MsgBox ("No Records Dude")
End If
rs.close
cnn.Close
Set rsCom = Nothing