R
Randy
I am trying to use OpenRecordset on a linked table with
the dbOpenTable option. The help file states that this
will produce a runtime error, but doesn't really give any
viable alternatives. The procedure is designed to delete a
record from the table in question. It works if the table
is within the same .mdb.
I have split the database so that tables are in a
separate .mdb, hence the link.
Below is the procedure I've used.
Private Sub lstCatResend_DblClick(Cancel As Integer)
Dim rstCatResend As DAO.Recordset
Dim var1 As String
var1 = Me!lstCatResend.Column(0) 'set var1 to PopID
Set rstCatResend = CurrentDb.OpenRecordset _
("tblVCXPlusCatalystResend", dbOpenTable)
rstCatResend.Index = "PopID"
With rstCatResend
.Seek "=", var1
.Delete
End With
rstCatResend.Close
Me!lstCatResend.Requery
End Sub
the dbOpenTable option. The help file states that this
will produce a runtime error, but doesn't really give any
viable alternatives. The procedure is designed to delete a
record from the table in question. It works if the table
is within the same .mdb.
I have split the database so that tables are in a
separate .mdb, hence the link.
Below is the procedure I've used.
Private Sub lstCatResend_DblClick(Cancel As Integer)
Dim rstCatResend As DAO.Recordset
Dim var1 As String
var1 = Me!lstCatResend.Column(0) 'set var1 to PopID
Set rstCatResend = CurrentDb.OpenRecordset _
("tblVCXPlusCatalystResend", dbOpenTable)
rstCatResend.Index = "PopID"
With rstCatResend
.Seek "=", var1
.Delete
End With
rstCatResend.Close
Me!lstCatResend.Requery
End Sub