I've got this simple code to delete a record... (which works just fine); the problem is navigating to a valid record once it is deleted.
At first I did not have the me.requery line, and I thought that might help... but no
Code:
vCurrentRecordNo = Me.CurrentRecord sSQL = "Delete from tbeFixtureTypeDetails" & " WHERE [Type] = '" & [Forms]![frmSpec]![txtType] & "';"
CurrentDb().Execute sSQL, dbFailOnError
Me.Requery
If vCurrentRecordNo = 1 Then
DoCmd.GoToRecord , , acGoTo, 1
Else
DoCmd.GoToRecord , , acGoTo, vCurrentRecordNo - 1
End If
as always, with many thanks in advance,
Mark