Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Report error in MS Access 2000

Status
Not open for further replies.

Valeriya

MIS
Jan 9, 2006
138
US
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":
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
 
Hi mp9! I tried it. It makes no difference. Gives me the same error message.

Thanks much!

Valeriya
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top