Ally
Registered User.
- Local time
- Today, 17:16
- Joined
- Sep 18, 2001
- Messages
- 617
Hi All
I'm back with Access again for a short time (hurray) where I'm picking up a problem for one of Col's dbs. And I'm really stuck!
It's a car parking db and you go into the record from a form with a list box on.
There is a delete button, which has the usual wizard code behind it:
Basically all this did was bring up the msgbox, bleep and not do anything else. When I debugged, it appeared to go through the code no problem.
I looked at an older db of mine and changed a few bits:
This closes the form, but doesn't appear to delete or requery, and when you click on the list box, there's now an error message, "No Current Record".
Anyone know what I'm doing wrong please.
Many thanks - Ally
I'm going now, but will be back on Monday.
I'm back with Access again for a short time (hurray) where I'm picking up a problem for one of Col's dbs. And I'm really stuck!

It's a car parking db and you go into the record from a form with a list box on.
There is a delete button, which has the usual wizard code behind it:
Code:
On Error GoTo Err_Delete_Click
Dim rsp As Variant
rsp = MsgBox("You will delete the entire record and associated permit and car details. Are you sure you want to do this?", vbQuestion + vbYesNo, "Warning!!!")
If rsp = vbYes Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Else
Exit Sub
End If
Exit_Delete_Click:
Exit Sub
Err_Delete_Click:
MsgBox Err.Description
Resume Exit_Delete_Click
Basically all this did was bring up the msgbox, bleep and not do anything else. When I debugged, it appeared to go through the code no problem.
I looked at an older db of mine and changed a few bits:
- added docmd.setwarnings false and true before and after code
- changed the Variant to Integer
- Added docmd.close and requery of the form that the listbox is on, after the DoCmd. .... ... acVer70.
This closes the form, but doesn't appear to delete or requery, and when you click on the list box, there's now an error message, "No Current Record".
Anyone know what I'm doing wrong please.
Many thanks - Ally
I'm going now, but will be back on Monday.
Last edited: