Hi, all! Could you help me? I have a dialog box that I use to develop a filter for another form. When I open the form, I want to print a report based on the form. I can set the filter of the form to the report and it works. However, when I try to set the form's textbox (unbound) to the report textbox, the data does not transfer. The code is below. Does anyone have any ideas?
Private Sub PrintRpt2_Click()
On Error GoTo Err_PrintRpt2_Click
Dim stDocName As String
Dim sttext As String
stDocName = "RptFrmTrackRptDatesODR"
DoCmd.OpenReport stDocName, acPreview
Me.Filter = Reports!RptFrmTrackRptDatesODR.Filter
Me.Text118 = Reports!RptFrmTrackRptDatesODR.Text118.Value
Me.Text110 = Reports!RptFrmTrackRptDatesODR.Text110.Value
Exit_PrintRpt2_Click:
Exit Sub
Err_PrintRpt2_Click:
MsgBox Err.Description
Resume Exit_PrintRpt2_Click
End Sub
Private Sub PrintRpt2_Click()
On Error GoTo Err_PrintRpt2_Click
Dim stDocName As String
Dim sttext As String
stDocName = "RptFrmTrackRptDatesODR"
DoCmd.OpenReport stDocName, acPreview
Me.Filter = Reports!RptFrmTrackRptDatesODR.Filter
Me.Text118 = Reports!RptFrmTrackRptDatesODR.Text118.Value
Me.Text110 = Reports!RptFrmTrackRptDatesODR.Text110.Value
Exit_PrintRpt2_Click:
Exit Sub
Err_PrintRpt2_Click:
MsgBox Err.Description
Resume Exit_PrintRpt2_Click
End Sub