I am new at VB, but learning.
The following code (part of the code) give gives me an error (Compile Error: Method or data member not found:
Dim rst As Recordset
Dim rst2 As Recordset
Dim dbs As Database
Set dbs = CurrentDb
dbs.Execute ("DELETE * FROM Groupfile") 'empty table for new data
Set rst = dbs.OpenRecordset("Select * from old where groupname = " & Me.groupname)
Set rst2 = dbs.OpenRecordset("select * from groupfile where groupname = " & rst!groupname)
rst2.AddNew
rst2!groupno = tst!groupno
rst2!groupname = rst!groupname
rst2!new = rst!new
......
The error defines me.groupname as the error field. This field is defined in both old anf GroupFile tables. It must be the format, but I cannot detect what is wrong.
Please help.
Thanks in advance.
The following code (part of the code) give gives me an error (Compile Error: Method or data member not found:
Dim rst As Recordset
Dim rst2 As Recordset
Dim dbs As Database
Set dbs = CurrentDb
dbs.Execute ("DELETE * FROM Groupfile") 'empty table for new data
Set rst = dbs.OpenRecordset("Select * from old where groupname = " & Me.groupname)
Set rst2 = dbs.OpenRecordset("select * from groupfile where groupname = " & rst!groupname)
rst2.AddNew
rst2!groupno = tst!groupno
rst2!groupname = rst!groupname
rst2!new = rst!new
......
The error defines me.groupname as the error field. This field is defined in both old anf GroupFile tables. It must be the format, but I cannot detect what is wrong.
Please help.
Thanks in advance.