B
bw
I call this procedure from the Report_Open event, and am getting the error
shown on the 6th line below.
I'm trying to find out how many records (if any) are in the table
"tblSelectMainReport".
Can you explain the error, or a better way to find out the number of records
in the table?
Thanks,
Bernie
Private Sub CountTheErrors()
Dim dbs As Database, rst As Recordset, X As Integer, strName As String
Dim strDocName As String
Set dbs = CurrentDb
strDocName = "tblSelectMainReport"
Set rst = dbs.OpenRecordset(strDocName) 'ERROR HERE: Type mismatch
MsgBox rst.RecordCount
rst.Close
Set dbs = Nothing
End Sub
shown on the 6th line below.
I'm trying to find out how many records (if any) are in the table
"tblSelectMainReport".
Can you explain the error, or a better way to find out the number of records
in the table?
Thanks,
Bernie
Private Sub CountTheErrors()
Dim dbs As Database, rst As Recordset, X As Integer, strName As String
Dim strDocName As String
Set dbs = CurrentDb
strDocName = "tblSelectMainReport"
Set rst = dbs.OpenRecordset(strDocName) 'ERROR HERE: Type mismatch
MsgBox rst.RecordCount
rst.Close
Set dbs = Nothing
End Sub