If you want to see the event procedure that makes the button work, open the button's property sheet, and then click the Build button next to the OnClick property box.
Tip You can print a form's current record in a report by carrying out the OpenReport action in the Click event procedure for a command button. For example, adding the following Visual Basic for Applications code to the Click event procedure for a command button on an Orders form prints the current record in the Invoice report:
Dim strDocName As String
Dim strFilter As String
strDocName = "Invoice"
strFilter = "OrderID = Forms!Orders!OrderID"
DoCmd.OpenReport DocName, acViewNormal, , strFilter