Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[blue]Change:
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
To:
DoCmd.RunCommand acCmdSelectRecord
docmd.RunCommand acCmdDeleteRecord[/blue]
Private Sub cmdDelete_Click()
Dim Msg, Style, Title, Response
Msg = "Delete the Record for " & Me.UniqueField & "?"
Style = vbYesNo + vbCritical
Title = "Delete Selected Record"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
End If
The best I can think of is to move your button code to the [blue]On DBL Click[/blue] event of one of the fields. At least this shows intentional selection for delete by the user.TheAceMan1 said:[blue]When the form opens ... the currently selected record happens to be the 1st record ... set by access.[/blue]