Can someone show me the code of how to open a VBA recordset? I have a query I'd like to mess around with via VBA... i know how to do this in vbscript with ASP but not in ms access.
At the moment I have:
But it's giving me errors.
Thanks
At the moment I have:
Code:
Dim dbs As Database, rst As Recordset, strSQL As String
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("TblRecs")
If Not (rst.BOF Or rst.EOF) Then
MsgBox "No Records Available.", vbInformation
Else
Do While Not rst.EOF
cfilter = cfilter & " OR OrderID=" & rs![OrderID]
Loop
End If
rst.Close
But it's giving me errors.
Thanks