As the title says, I'm running into this error while trying to open a report:
Error 3464 Reserved Error
here is the code (I trimmed it a little):
Code:
Private Sub LKA2_RUN_BTN_Click()
DoCmd.Hourglass True
DoCmd.SetWarnings False
On Error GoTo Err_Handler
'Purpose: Open the report filtered to the items selected in the list box.
Dim varItem As Variant 'Selected items
Dim strWhere As String 'String to use as WhereCondition
Dim strDescrip As String 'Description of WhereCondition
Dim lngLen As Long 'Length of string
Dim strDelim As String 'Delimiter for this field type.
Dim strDoc As String 'Name of report to open.
Dim strsql As String
strDelim = """"
strDoc = "TDL_REPORT_MWC"
strWhere = ""
strDescrip = ""
DoCmd.OpenReport strDoc, acViewPreview, WhereCondition:=strWhere, OpenArgs:=strDescrip
DoCmd.SetWarnings True
DoCmd.Hourglass False
Exit_Handler:
Exit Sub
Err_Handler:
If Err.Number <> 2501 Then 'Ignore "Report cancelled" error.
MsgBox "Error " & Err.Number & " - " & Err.Description, , "cmdPreview_Click"
End If
Resume Exit_Handler
End Sub
Edit: I noticed the same code works perfect in Access 2007...