Hi,
I just a simple question regarding deleting a data.
I have a listed of record on my continuous form, so I am wondering which will be the safe/better way/quicker to delete record?
1/
2/
3/
Is there any difference? My database is store backend.
The reason I am asking if I run into so many issue using the method 3 on the form itself, so since each record has its own primary key, I think it's safer to delete via sql and just requery as 1 or 2.
Any thought?
I just a simple question regarding deleting a data.
I have a listed of record on my continuous form, so I am wondering which will be the safe/better way/quicker to delete record?
1/
Code:
CurrentDb.Execute "DELETE FROM tblname" & "WHERE id = " & Me.txtId
Code:
DoCmd.SetWarnings False
sSql = "DELETE FROM tblName WHERE id = " & Me.txtId DoCmd.RunSQL sSql
DoCmd.SetWarnings True
Code:
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
Is there any difference? My database is store backend.
The reason I am asking if I run into so many issue using the method 3 on the form itself, so since each record has its own primary key, I think it's safer to delete via sql and just requery as 1 or 2.
Any thought?