Hi guys,
I have got a major problem that I can't seem to be able to resolve. I have a form that works fine in MS Access 2003 and gives me trouble when I run it in MS Access 2000. I have a botton on the form that on click event should open a report based on a certain filter(that I choose). Here is the code for the "on click event":
As I click on the botton I get the following error message:
Compile Error: Wrong number of arguments or invalid property assignment.
DoCmd.OpenReport gets highlighted. In Access 2003 this code works just fine.
Do you see any problems with my code?
Thank you very much,
Valeriya
I have got a major problem that I can't seem to be able to resolve. I have a form that works fine in MS Access 2003 and gives me trouble when I run it in MS Access 2000. I have a botton on the form that on click event should open a report based on a certain filter(that I choose). Here is the code for the "on click event":
Code:
Private Sub Assignee_Form_cmdOpenReport_Click()
On Error GoTo Assignee_Form_cmdOpenReport___On_Click_Err
With CodeContextObject
[b] DoCmd.OpenReport .lstReports, acViewPreview, "", .txtReportFilter, acNormal[/b]
End With
Assignee_Form_cmdOpenReport___On_Click_Exit:
Exit Sub
Assignee_Form_cmdOpenReport___On_Click_Err:
MsgBox Error$
Resume Assignee_Form_cmdOpenReport___On_Click_Exit
End Sub
As I click on the botton I get the following error message:
Compile Error: Wrong number of arguments or invalid property assignment.
DoCmd.OpenReport gets highlighted. In Access 2003 this code works just fine.
Do you see any problems with my code?
Thank you very much,
Valeriya