J
John
Here is the code that I am trying to run. What I am
trying to do is look at a recordset (Table: TestData) and
if there are no records in the table then open up one form
otherwise opening up another form. The code blows up at
on the "Set rst = db.OpenRecordSet("TestData") and I get a
error message saying "Type Mismatch". I can see what I am
doing wrong?
Thanks in advance,
Here is the code:
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("TestData")
If rst.EOF = True Then
DoCmd.OpenForm "Success"
Else
DoCmd.OpenForm "tblToolWatchBad"
End If
trying to do is look at a recordset (Table: TestData) and
if there are no records in the table then open up one form
otherwise opening up another form. The code blows up at
on the "Set rst = db.OpenRecordSet("TestData") and I get a
error message saying "Type Mismatch". I can see what I am
doing wrong?
Thanks in advance,
Here is the code:
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("TestData")
If rst.EOF = True Then
DoCmd.OpenForm "Success"
Else
DoCmd.OpenForm "tblToolWatchBad"
End If