Print Current Subform Record

  • Thread starter Thread starter RLTAYLOR
  • Start date Start date
R

RLTAYLOR

Guest
I created a form with a subform. In form view, the form displays one record and the subform displays one record. The subform is set for "single form view". However, to view as a report, all the subform records are displaying. How can I correct this? The basic code to view a current record does not do the job. The goal is to requisition one item on a Purchase Order. Thanks in advance.
 
I had a similar problem

This is what worked for me in my report

Private Sub cmdPreviewReport_Click()
On Error GoTo Err_cmdPreviewReport_Click

Dim frmCurrentForm As Form
Set frmCurrentForm = Screen.ActiveForm
DoCmd.RunCommand acCmdRefresh
DoCmd.OpenReport "CEARequest_report", acViewPreview, , "[Request_Num]=" & Forms!CEARequest_form![Request_Num]

Exit_cmdPreviewReport_Click:
Exit Sub

Err_cmdPreviewReport_Click:
MsgBox Err.Description
Resume Exit_cmdPreviewReport_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom