Prattaratt
Technical User
Were there any changes to the way subforms load between 2000 and 2003? The reason I ask is I have a problem that only occurs on 2003, but does not occur on my 2000 development system. The problem is I am trying to set subForm control values during loading, but on the 2000 system it says I have an invalid reference to the "Form" property. In the watch window, the property is not set, but on my 2000 system, it works just fine. Any clues as to how I can work around this? Here is the code in question:
Code:
Private Sub Form_Load()
ExitByBtn (False)
Me.TripNumber.Value = "0"
' the next line is where it craps out on me.
Me.BillingSubForm.Form.Controls("TripNum").Value = 0
Me.Payment_Subform.Form.Controls("TripNum").Value = 0
Me.BillingSubForm.Form.Filter = "[TripNum] = '0'"
Me.BillingSubForm.Form.FilterOn = True
Me.Payment_Subform.Form.Filter = "[TripNum] = '0'"
Me.Payment_Subform.Form.FilterOn = True
Me.Consignee.Form.Filter = "ID = 0"
Me.Consignee.Form.FilterOn = True
End Sub