printing

  • Thread starter Thread starter chris
  • Start date Start date
C

chris

I have report that I want to print which takes certain
information from a table.

My question is: When in the form if i select print the
report prints all of the records in the table.

How can I print only that record which is currently
displayed on screen?Thanks
 
You need to add a button to your form and put code in the OnClick event
similar to the following...

Private Sub Print_Button_Click()
If (IsNull([UserID])) Then
' If no employee selected, stop procedure
Exit Sub
End If
DoCmd.OpenReport "Admin - Employee Worksheet", acViewNormal, "",
"[UserID]=Forms![frmSINEmpDataMaintenance]![UserID]"
End Sub






This code sends a report named "Admin - Employee Worksheet" directly to the
printer. It filters the report to only pull for the current employee
UserID.


Rick B





I have report that I want to print which takes certain
information from a table.

My question is: When in the form if i select print the
report prints all of the records in the table.

How can I print only that record which is currently
displayed on screen?Thanks
 
Back
Top