E
Erik
I am having trouble opening a table and an receiving
a "Run Time Error 13" Type Mismatch error.
The error occurs with the this line of code:
Set rstRaceData = dbs.OpenRecordset("RaceData",
dbOpenDynaset)
I can make it to the Test 1 msgbox but not the Test 2
I will accept any and all help.
The full code is as follows:
Private Sub Test_Click()
'On Error GoTo Err_Test_Click
Dim rst As Recordset
Dim rstRaceData As Recordset
Dim Win As Currency
Dim WinPay As Currency
Dim dbs As Database
Set dbs = CurrentDb
MsgBox ("Test 1")
Set rstRaceData = dbs.OpenRecordset("RaceData",
dbOpenDynaset)
rstData.MoveFirst
MsgBox ("Test 2")
WinPay = !Win
MsgBox ("Test Data Retrieved " & WinPay)
Exit_Test_Click:
Exit Sub
Err_Test_Click:
MsgBox Err.Description
Resume Exit_Test_Click
End Sub
a "Run Time Error 13" Type Mismatch error.
The error occurs with the this line of code:
Set rstRaceData = dbs.OpenRecordset("RaceData",
dbOpenDynaset)
I can make it to the Test 1 msgbox but not the Test 2
I will accept any and all help.
The full code is as follows:
Private Sub Test_Click()
'On Error GoTo Err_Test_Click
Dim rst As Recordset
Dim rstRaceData As Recordset
Dim Win As Currency
Dim WinPay As Currency
Dim dbs As Database
Set dbs = CurrentDb
MsgBox ("Test 1")
Set rstRaceData = dbs.OpenRecordset("RaceData",
dbOpenDynaset)
rstData.MoveFirst
MsgBox ("Test 2")
WinPay = !Win
MsgBox ("Test Data Retrieved " & WinPay)
Exit_Test_Click:
Exit Sub
Err_Test_Click:
MsgBox Err.Description
Resume Exit_Test_Click
End Sub