Private Sub cmdDeleteRecord_Click() On Error GoTo Err_cmdDeleteRecord_Click DoCmd.SetWarnings False DoCmd.RunCommand acCmdSelectRecord DoCmd.RunCommand acCmdDeleteRecord Dim r As DAO.Recordset Set r = CurrentDb.OpenRecordset("SELECT * FROM Wetform") 'How to get the BOf to be true when at record 1. If r.BOF Then DoCmd.GoToRecord , , acNext Else DoCmd.GoToRecord , , acPrevious End If DoCmd.SetWarnings True Exit_cmdDeleteRecord_Click: Exit Sub Err_cmdDeleteRecord_Click: MsgBox Err.Description Resume Exit_cmdDeleteRecord_Click End Sub
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.