hii everyone,
I got error runtime error 3156 when i delete it. i'v tried to this code, but i got the same errors message.
Does anyone knows how to fix it ?
Thanks a lot
I got error runtime error 3156 when i delete it. i'v tried to this code, but i got the same errors message.
Code:
Dim strSQL As String
strSQL = "DELETE FROM " & Table & " where [_date] between #" & Form_frm_dbo_cfa.cmbdate1.Value & "# and #" & Form_frm_dbo_cfa.cmbdate2.Value & "#"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
Code:
Dim strSQL As String
DIM db as Database
strSQL = "DELETE FROM " & Table & " where [_date] between #" & Form_frm_dbo_cfa.cmbdate1.Value & "# and #" & Form_frm_dbo_cfa.cmbdate2.Value & "#"
Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL)
Does anyone knows how to fix it ?
Thanks a lot