RE: Error 2501



If she is getting those messages, Macro Security is set too high. Form the
main menu bar, Tools, Macro, Security.

"Daniel" wrote:

Good morning,

I'm having a compatibility issue (I believe) between 2000 and 2003. I use
the following sub to open a selected report form a listbox.

Private Sub lstReports_DblClick(Cancel As Integer)
On Error GoTo lstReports_DblClick_Error

'Open report based on user selection
Dim strRptName As String
strRptName = Me.lstReports

If Not IsNull(strRptName) Then
If strRptName = "Drawings Forecasted per Week" Then
DoCmd.OpenForm "Forecast Rpt Date Selection Frm", acNormal
ElseIf Left(strRptName, 5) = "DRM -" Then
DoCmd.OpenForm "DRM Report Form", acNormal
Else
DoCmd.OpenReport Me.lstReports, acViewPreview
End If
End If

On Error GoTo 0
Exit Sub

lstReports_DblClick_Error:
MsgBox "MS Access has generated the following error" & vbCrLf & vbCrLf &
"Error Number: " & _
Err.Number & vbCrLf & "Error Source: Form_Report Selection Frm /
lstReports_DblClick" & vbCrLf & _
"Error Description: " & Err.Description, vbCritical, "An Error has
Occured!"
Resume Next

End Sub

It works fine for any user running on access 2000. It also workd fine on my
personal laptop running access 2003. However, a specific user running access
2003 keeps getting error 2501- The OpenReport action was cancelled. When she
work on another computer with 2000 it works. This leads me to believe it is
a 2003 thing?! But then why does it wok fine for me?

Another particular thing with her computer is the fact that she get prompted
with 3 dialogs when she open the db. A security warning about blocking
unsafe expressions, something a jet and then the standard message confirming
opening this file... The first 2 dialog do not appear for anyone else...
Is this a config issue with her pc? Does anyone know what might be the
problem in this case?

Is "DoCmd.OpenReport Me.lstReports, acViewPreview" an acceptable command in
both 2000 and 2003? or should I be using another command instead?

Thanking you in advance for your help,

Daniel
.



Relevant Pages

  • Re: Generic Password
    ... >> User-Level Security. ... >>> Dim stDocName As String ... >>> Exit Sub ... >>> Employee clicks on Login.htm and selects thier ...
    (microsoft.public.access.formscoding)
  • Re: Sheet passwording
    ... > Private Sub Worksheet_Activate ... > to change the macro security settings to get the macro to run. ... > You will also need to password protect your VBA project so no one can see ...
    (microsoft.public.excel.misc)
  • Re: Sheet passwording
    ... >> Private Sub Worksheet_Activate ... >> to change the macro security settings to get the macro to run. ... >> You will also need to password protect your VBA project so no one can ...
    (microsoft.public.excel.misc)
  • RE: VB.net WMI Win32_NtlogEvent problem, please help
    ... The access deinied is driven by trying to access the "security" logfile. ... > Set objLatestEvent = colMonitoredEvents.NextEvent ... > where a new log written into the logfiles. ... > End Sub ...
    (microsoft.public.dotnet.general)
  • RE: Self-Signed Test Certificates and signing SHIMS for Add-Ins
    ... What we are trying to understand is whether a self-signed test certificate ... With the self-signed certificate and medium security settings, ... This combination automatically disables all ... > If you do set your Office macro security to High or Very High, ...
    (microsoft.public.office.developer.automation)