when i run this code

Private Sub Command0_Click()

Dim mydb As Database
Dim Table As Recordset


Dim i As Integer, j As Integer, X As Boolean

Set mydb = CurrentDb()

Set Table = mydb.OpenRecordset("Tbl:L2 BUDGET", DB_OPEN_DYNASET)

Table.MoveFirst

X = True
Do While X = True


If Table![ecode].Value = "12000" Then
Table.Edit
Table![spending] = "15000"
Table.Update
X = False
Else
Table.MoveNext
End If
Loop

End Sub

I got a message :"type dismatch" and stop runing in line set table=.....
I need your help