G
Glint
Hi All,
I have this code for a delete button on my form:
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click
If vbYes = MsgBox("You are about to delete 1 record." & vbCrLf & vbCrLf
& _
"If you click YES, you won't be able to undo this Delete operation." &
vbCrLf & vbCrLf & _
"Are you sure you want to delete this record?", vbYesNo +
vbInformation, "ECKANKAR AREA ADMIN") Then
DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Else
Exit Sub
DoCmd.SetWarnings True
End If
DoCmd.SetWarnings True
Exit_cmdDelete_Click:
Exit Sub
Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click
End Sub
I also have:
cmdDelete.Visible=False
in the On Current code of the form, because I want the button displayed only
on specific conditions.
These codes work fine. But I found that after I packaged and installed the
mde version of the application with the Office Developer 2002 (Windows XP II)
on my machine in the office, the following error message would come up
whenever I delete a record with the button:
"Access can't find the field 'l' referred to in your expression."
Strangely, this error message does not show up in the mde or the mdb
version, nor on the PC at the ECK Center (also Windows XP) where I also
installed the package. It only shows up on the machine which I used to
develop and package the application.
Do you have an idea what is responsible for this error message?
I have this code for a delete button on my form:
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click
If vbYes = MsgBox("You are about to delete 1 record." & vbCrLf & vbCrLf
& _
"If you click YES, you won't be able to undo this Delete operation." &
vbCrLf & vbCrLf & _
"Are you sure you want to delete this record?", vbYesNo +
vbInformation, "ECKANKAR AREA ADMIN") Then
DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Else
Exit Sub
DoCmd.SetWarnings True
End If
DoCmd.SetWarnings True
Exit_cmdDelete_Click:
Exit Sub
Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click
End Sub
I also have:
cmdDelete.Visible=False
in the On Current code of the form, because I want the button displayed only
on specific conditions.
These codes work fine. But I found that after I packaged and installed the
mde version of the application with the Office Developer 2002 (Windows XP II)
on my machine in the office, the following error message would come up
whenever I delete a record with the button:
"Access can't find the field 'l' referred to in your expression."
Strangely, this error message does not show up in the mde or the mdb
version, nor on the PC at the ECK Center (also Windows XP) where I also
installed the package. It only shows up on the machine which I used to
develop and package the application.
Do you have an idea what is responsible for this error message?