C
Cheng-Liang Shen
Hi All
Sorry about this silly question. I have a piece of codes below and it
always give me the Compiler error "Method or data member not found "
when the procedure is triggered by the form activity. I am very sure the
table "Changed_SRD_Anchors_List" does have two text fields
SRD_Anchor and SRD_Filename but couldn't figure out why the MSACCESS can't
recognize them.
Please help me with this problem or give me the hint how to debug this
problem. Really thanks a lot.
Private Sub Changed_SRD_Anchor_AfterUpdate()
Dim db As Database
Dim srd_list As Recordset
Set db = CurrentDb()
Set srd_list = db.OpenRecordset("Changed_SRD_Anchors_List")
<--------------This is the table name where I try to add a new record.
With srd_list
.AddNew
.[SRD_Anchor] = [Changed_SRD_Anchor]
^^^^^^^^^^^^^^ ----> Method or data member not found.
.[SRD_Filename] = DLookup("SRD_Anchors_To_SRD_Files",
"SRD_filename", "[SRD_Anchor] = " & _
[Changed_SRD_Anchor])
.Update
.Close
End With
Set db = Nothing
Me![Changed_SRD_Anchors_List_subform].Requery
Me![Changed_SRD_Anchor].SetFocus
End Sub
Sorry about this silly question. I have a piece of codes below and it
always give me the Compiler error "Method or data member not found "
when the procedure is triggered by the form activity. I am very sure the
table "Changed_SRD_Anchors_List" does have two text fields
SRD_Anchor and SRD_Filename but couldn't figure out why the MSACCESS can't
recognize them.
Please help me with this problem or give me the hint how to debug this
problem. Really thanks a lot.
Private Sub Changed_SRD_Anchor_AfterUpdate()
Dim db As Database
Dim srd_list As Recordset
Set db = CurrentDb()
Set srd_list = db.OpenRecordset("Changed_SRD_Anchors_List")
<--------------This is the table name where I try to add a new record.
With srd_list
.AddNew
.[SRD_Anchor] = [Changed_SRD_Anchor]
^^^^^^^^^^^^^^ ----> Method or data member not found.
.[SRD_Filename] = DLookup("SRD_Anchors_To_SRD_Files",
"SRD_filename", "[SRD_Anchor] = " & _
[Changed_SRD_Anchor])
.Update
.Close
End With
Set db = Nothing
Me![Changed_SRD_Anchors_List_subform].Requery
Me![Changed_SRD_Anchor].SetFocus
End Sub