Pass a parameter into an access report programmatically

前端 未结 5 1008
逝去的感伤
逝去的感伤 2020-12-03 14:33

I\'ve got an existing Access MDB. I\'m adding a command button to an existing Form that runs an existing report. The change being made is that this button needs to pass in

5条回答
  •  伪装坚强ぢ
    2020-12-03 15:05

    Why everyone wants to make this so complicated, I don't know.

    1. save your report's recordsource without parameters.

    2. as suggested by Remou, pass the criteria in the appropriate argument of DoCmd.OpenReport.

    Trying to do it any other way is going to be a matter of resisting the natural methods for accomplishing tasks in Access.

提交回复
热议问题