H
H. Martins
Dim stString As String
Dim rs As DAO.Recordset
'lintLastRecord is a public variable where the key record number
to be found is located
If lintLastRecord = 0 Then 'do nothing
Else
Set rs = DBEngine(0)
(0).OpenRecordset("qryModifListaAssociacoes")
rs.Filter = "lintAssociacoesEEmpresasKMaster=" & If
lintLastRecord
If Not rs.EOF Then
rs.Delete
End If
lintLastRecord = 0 'clears, just in case
End If
rs.Update
rs.Close
Set rs = Nothing
Note: lintAssociacoesEEmpresasKMaster belongs to tblAssocEEmpresas - I
am not sure if I must use:
tblAssocEEmpresas.lintAssociacoesEEmpresasKMaster or
rs.lintAssociacoesEEmpresasKMaster
.... anyway, I tried several hypothesis
Now, if I remove the filter it deletes the fist record, of course.
With the filter, nothing happens
Can I have some help, please?
Henry
Dim rs As DAO.Recordset
'lintLastRecord is a public variable where the key record number
to be found is located
If lintLastRecord = 0 Then 'do nothing
Else
Set rs = DBEngine(0)
(0).OpenRecordset("qryModifListaAssociacoes")
rs.Filter = "lintAssociacoesEEmpresasKMaster=" & If
lintLastRecord
If Not rs.EOF Then
rs.Delete
End If
lintLastRecord = 0 'clears, just in case
End If
rs.Update
rs.Close
Set rs = Nothing
Note: lintAssociacoesEEmpresasKMaster belongs to tblAssocEEmpresas - I
am not sure if I must use:
tblAssocEEmpresas.lintAssociacoesEEmpresasKMaster or
rs.lintAssociacoesEEmpresasKMaster
.... anyway, I tried several hypothesis
Now, if I remove the filter it deletes the fist record, of course.
With the filter, nothing happens
Can I have some help, please?
Henry