Bonediggler1
Technical User
Hello--
I am getting the "method or data member not found" error on .[BLAH] with the code below. All table, field, etc names exist and are spelled correctly. I just used the same code in a different table without error. Any idea what the problem is???
Sub TEST()
Dim DBS As Database
Dim RST As Recordset
Dim X As Integer
Dim RTYPE
Set DBS = CurrentDb
Set RST = DBS.OpenRecordset("tblTEST")
With RST
.MoveFirst
For X = 1 To RST.RecordCount
RTYPE = .[BLAH]
DBS.Execute "INSERT INTO TBLTEST SELECT '" & RTYPE & "' AS DATA "
.MoveNext
Next
End With
End Sub
I am getting the "method or data member not found" error on .[BLAH] with the code below. All table, field, etc names exist and are spelled correctly. I just used the same code in a different table without error. Any idea what the problem is???
Sub TEST()
Dim DBS As Database
Dim RST As Recordset
Dim X As Integer
Dim RTYPE
Set DBS = CurrentDb
Set RST = DBS.OpenRecordset("tblTEST")
With RST
.MoveFirst
For X = 1 To RST.RecordCount
RTYPE = .[BLAH]
DBS.Execute "INSERT INTO TBLTEST SELECT '" & RTYPE & "' AS DATA "
.MoveNext
Next
End With
End Sub