So the real problem is that I have a field named Print (reserved word). I can't change the field name because of reasons outside my control.
The goal of this code is to be able to click on a field and have that field populate a txtbox which can then be used as search criteria.
The code below gives an error because the subreport is not open. (Coincidentally this is the reason for the clunky code being used to populate the txtbox, so if you know a better way to do that please speak up.)
The goal of this code is to be able to click on a field and have that field populate a txtbox which can then be used as search criteria.
The code below gives an error because the subreport is not open. (Coincidentally this is the reason for the clunky code being used to populate the txtbox, so if you know a better way to do that please speak up.)
Code:
Private Sub Print_Click()
Dim strWorkOrder As String
strWorkOrder = Reports!rptsubIPACHistory!("Print")
Forms!frmIPACHistory!txtSearchWorkOrder.SetFocus
Forms!frmIPACHistory!txtSearchWorkOrder.Text = strWorkOrder
End Sub
Comment