Hello,
I need to delete data in a table that named Cap One Table. I can not use a delete query since database located on company server and it is being used by many people. So, I have created a form and put on there two text boxes - txtStartDate and txtEndDate and command button cmdDelete. An idea behind this is that a user types date in txtStartDate and txtEndDate and click command button and delition happend in table Cap One based on that criteria. I put the below code in command button click event , but it doesn't work. Please, really apreciate and alot of thanks in advance if you help me with code:
Dim startDate As String
Dim EndDate As String
Dim strSql As String
startDate = txtStartDate.Value
EndDate = txtEndtDate.Value
strSql = "Delete Cap One.Date" & _
"FROM Cap One" & _
"WHERE (((Cap One.Date)>=#" & startDate & "# And (Cap One.Date)<=" & EndDate & "#"
Thank you ,
Best Regards,
Borisgomel