J
Job
Hi All,
Please, it would like a help.
I have a form with a list box (lstDic) based in a query (qryDic) and I would
like to select a register in the list box to delete it.
My code is the following one:
Private Sub cmdExcluir_Click()
Dim MySet As Recordset, varItem As Variant
For Each varItem In lstDic.ItemsSelected
Set MySet = CurrentDb.OpenRecordset("qryDic", dbOpenDynaset)
MySet.FindFirst "code = " & [Me.qryDic] & "Code = '" & lstDic.Column(0) & "'"
MySet.Delete
MySet.Close
Next varItem
lstDic.Requery
End Sub
But the following error (2465) appears: "The Microsoft Office Access cannot
locate the related field "|" in your expression."
Someone can help me?
Thanks.
Please, it would like a help.
I have a form with a list box (lstDic) based in a query (qryDic) and I would
like to select a register in the list box to delete it.
My code is the following one:
Private Sub cmdExcluir_Click()
Dim MySet As Recordset, varItem As Variant
For Each varItem In lstDic.ItemsSelected
Set MySet = CurrentDb.OpenRecordset("qryDic", dbOpenDynaset)
MySet.FindFirst "code = " & [Me.qryDic] & "Code = '" & lstDic.Column(0) & "'"
MySet.Delete
MySet.Close
Next varItem
lstDic.Requery
End Sub
But the following error (2465) appears: "The Microsoft Office Access cannot
locate the related field "|" in your expression."
Someone can help me?
Thanks.