S
Stapes
Hi
I am adding a new record here, then trying to pick up the autonumber
key field for the record just written. I get 3265 Item not found in
this collection.
With rsCust
'#### add each item into a new record
.AddNew
.Fields("Co") = rsComp.Fields("Company")
.Fields("Add1") = rsComp.Fields("Address1")
.Fields("Add2") = rsComp.Fields("Address2")
.Fields("Add3") = ""
.Fields("Town") = rsComp.Fields("Town")
.Fields("Cnty") = rsComp.Fields("County")
.Fields("Pocd") = rsComp.Fields("Post Code")
.Fields("Country") = rsComp.Fields("Country")
.Fields("DT_Audit") = Date
.Update
.Close
End With
MsgBox "Customer record created. Key = " &
rsComp.Fields("PK_Comp")
Any ideas?
Stapes
I am adding a new record here, then trying to pick up the autonumber
key field for the record just written. I get 3265 Item not found in
this collection.
With rsCust
'#### add each item into a new record
.AddNew
.Fields("Co") = rsComp.Fields("Company")
.Fields("Add1") = rsComp.Fields("Address1")
.Fields("Add2") = rsComp.Fields("Address2")
.Fields("Add3") = ""
.Fields("Town") = rsComp.Fields("Town")
.Fields("Cnty") = rsComp.Fields("County")
.Fields("Pocd") = rsComp.Fields("Post Code")
.Fields("Country") = rsComp.Fields("Country")
.Fields("DT_Audit") = Date
.Update
.Close
End With
MsgBox "Customer record created. Key = " &
rsComp.Fields("PK_Comp")
Any ideas?
Stapes