SashaBuilder3
Programmer
Hi,
Here is a simple VBA code I'm trying to use to update a table (Access 2000):
*****************
Dim dbs
Dim rst As New ADODB.Recordset
Dim cnn As ADODB.Connection
Set dbs = CurrentDb()
Set cnn = CurrentProject.Connection
rst.Open "tbl2", cnn, adOpenKeyset, adLockOptimistic, adCmdTableDirect
rst.MoveFirst
With rst
Do
.Edit
!Data2 = Data2 & "_a"
.Update
.MoveNext
Loop While rst.EOF = False
End With
rst.Close
*******************
When I run it an error message comes up: 'Method or data member not found'
What's wrong with this code?
Thanks,
Alexandre
Here is a simple VBA code I'm trying to use to update a table (Access 2000):
*****************
Dim dbs
Dim rst As New ADODB.Recordset
Dim cnn As ADODB.Connection
Set dbs = CurrentDb()
Set cnn = CurrentProject.Connection
rst.Open "tbl2", cnn, adOpenKeyset, adLockOptimistic, adCmdTableDirect
rst.MoveFirst
With rst
Do
.Edit
!Data2 = Data2 & "_a"
.Update
.MoveNext
Loop While rst.EOF = False
End With
rst.Close
*******************
When I run it an error message comes up: 'Method or data member not found'
What's wrong with this code?
Thanks,
Alexandre