M Milan Registered User. Local time Today, 06:20 Joined Feb 17, 2002 Messages 85 May 22, 2002 #1 I HAVE A TABLE WHICH IS BOUND TO A FORM. I NEED TO DELETE ALL RECORDS IN THE TABLE THAT HAVE BEEN CREATED YESTERDAY, THROUGH CODE. THE DATE(YESTERDAY) WOULD BE ON THE FORM IN AN UNBOUND CONTROL. ANYIDEAS!!! MANY THANKS
I HAVE A TABLE WHICH IS BOUND TO A FORM. I NEED TO DELETE ALL RECORDS IN THE TABLE THAT HAVE BEEN CREATED YESTERDAY, THROUGH CODE. THE DATE(YESTERDAY) WOULD BE ON THE FORM IN AN UNBOUND CONTROL. ANYIDEAS!!! MANY THANKS
L llkhoutx Registered User. Local time Today, 00:20 Joined Feb 26, 2001 Messages 4,013 May 22, 2002 #2 Create a delete query with the required date in the criteria anbd run it on some event, then requery your form.
Create a delete query with the required date in the criteria anbd run it on some event, then requery your form.
D dontcare Guest May 26, 2002 #3 Try, Dim db as database Dim sql as string set db=currentdb sql="DELETE * FROM tblYourTable WHERE fldDate = '" & Me.[YourUnboundControl] & "'" db.Execute sql db.close
Try, Dim db as database Dim sql as string set db=currentdb sql="DELETE * FROM tblYourTable WHERE fldDate = '" & Me.[YourUnboundControl] & "'" db.Execute sql db.close