Just created a report and had the following code:
Worked perfectly now i've introduced a subreport and it errors out on the second line, TxtPurchaseOrder.SetFocus giving the error stated earlier. TxtPurchaseOrder is a bound field linking to a table, the subreport is bound to a query.
Thanks
TG
Code:
Private Sub Report_Activate()
TxtPurchaseOrder.Visible = True
TxtPurchaseOrder.SetFocus
Label17.Caption = "Thank you for your purchase order " & TxtPurchaseOrder.Text & " received "
TxtDate.Visible = True
TxtDate.SetFocus
TxtPurchaseOrder.Visible = False
Label17.Caption = Label17.Caption & TxtDate.Text & "."
Text28.SetFocus
TxtDate.Visible = False
End Sub
Thanks
TG