0

I've designed a simple form and a few reports in Access. I have designed it in Windows 7, with Access 2010, and when I open it on a Windows XP PC with Access runtime, I get the error "The expression on click you entered as the event property setting produced the following error". Can anyone help me with this one, please?

Private Sub cmdShoppingList_Click()
  On Error GoTo Err_cmdShoppingList_Click
    Dim stDocName As String

    stDocName = "Shopping List"
    DoCmd.OpenReport stDocName, acViewReport
  Exit_cmdShoppingList_Click:
    Exit Sub

  Err_cmdShoppingList_Click:
    MsgBox Err.Description
    Resume Exit_cmdShoppingList_Click

End Sub

I hope to get the answer soon. Here is a pic of my error message:

4

1 回答 1

0

(太愚蠢了,我不能在没有至少 50 名声望的情况下发表“评论”)

由于它适用于 Windows 7,但不适用于 Windows XP,因此在我看来,您可能已在仅存在于 Windows 7 中的报告上放置了 ActiveX 控件。在分发 MS Access 数据库/项目时,您将需要分发任何 DLL /OCXs 您已用于目标计算机。

于 2012-08-16T15:53:48.940 回答