Rocky Smolin at Beach Access Software
rockysmolin at bchacc.com
Tue Jul 8 11:08:58 CDT 2008
Try Me.Requery. Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Pedro Janssen Sent: Tuesday, July 08, 2008 8:04 AM To: AccessD Subject: [AccessD] delete data in form Dear AccessD members, its has been a long time ago since i asked for your help, but now i need it. I have a form on which i do some calculations. After the calculation, i want to delete the data with a deletequery through a macro. But when i have done that in the textbox the text: #Deleted# is shown. I have tried to refresh the form, with no result. Because of that i now, delete the data and close and re-open the form, by the code below. Sometimes however the inputfield are empty, and sometimes they aren't. How is that possible. Or is there a better way to do this. Thanks Pedro Janssen Private Sub cmdDelete_Click() On Error GoTo Err_cmdDelete_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "mcrDelete" DoCmd.RunMacro stDocName DoCmd.Close stDocName = "frmBerekenen" DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_cmdDelete_Click: Exit Sub Err_cmdDelete_Click: MsgBox Err.Description Resume Exit_cmdDelete_Click End Sub -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com