Code:
Private Sub DeleteRecord_Click()
On Error GoTo Err_DeleteRecord_Click
Dim msgboxanswer As Integer
msgboxanswer = MsgBox("Are you sure you want to Delete this Record?", vbOKCancel)
If msgboxanswer = 1 Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
DoCmd.Requery "CancellationList"
End If
Exit_DeleteRecord_Click:
Exit Sub
Err_DeleteRecord_Click:
MsgBox Err.Description
Resume Exit_DeleteRecord_Click
End Sub
Gives error on DoCmd.Requery "CancellationList". Works just fine in my MDB, complies fine, create MDE normal. when I click the button from my MDE I get a "There is no field named [CancellationList] in the current record.
I'm so confused! First time I've seen the error created only in MDE. Tried renaming the control with no success, still get the same error. Any other ideas to try?