CaN somebody help me find the error in my code ? I get the error
"invalid operation" with the following line :
tdf.Fields("Cus tomerID") = 121
Public Function Test()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim fld As DAO.Field
Dim tdf As DAO.TableDef
Set dbs = CurrentDb
Set rst = dbs.OpenRecords et("orders1", dbOpenDynaset)
Do While Not rst.EOF
rst.MoveNext
Set tdf = dbs.TableDefs(" Orders1")
Set fld = tdf.Fields("Cus tomerID')
tdf.Fields("Cus tomerID") = 121
Loop
rst.Close
Set rst = Nothing
Set dbs = Nothing
End Function
Comment