I can't figure out whats the problem...sometimes when i press delete button (vba code is written for it) it deletes my record, other times (on other PC's) it won't...altough setups is the same (at least i think so).
I use split db, and i have form with subform in it.I want to delete whole record (with subform) when i press my delete button.
here is the vba code i use for that button:
Dim Msg, Style, Title, Response
Msg = "Are you sure ?"
Style = vbYesNo + vbDefaultButton2
Title = "Delete"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
In later versions of Access, DoMenuItem has fallen out of favor. Try
instead. If that doesn't work either, look in the various References you have set on the various machines (Tools-->References with your VBA editor open) and make them all the same. Sounds like you might have different settings in the different installations of Access.
Yes, that sometimes happens when you delete a record from a form's recordset. What I've done to solve that is, immediately after deleting a record, I go to the first record of the recordset (DoCmd.GoToRecord ,,acFirst) to get Access to acknowledge the recordset again. Then you can proceed normally.