J
Joan
Hi,
I have a subform (in continuous forms view) upon which the control source
of one of its' controls is dependent upon the value of another control on
the form. For instance I want the control source of this control to be
ReturnedSalePrice2 if [Returned] Is Not Null, otherwise the control source
should be [SalesPrice]. I tried putting the following code in the subform's
OnLoad event but it doesn't work. I get #Name? in the control instead.
Should this not be on the OnLoad event of the subform? What am I doing
wrong?
Private Sub Form_Load()
If Not IsNull(Me.Returned) Then
Me.SalesPrice.ControlSource = ReturnedSalePrice2
Else
Me.SalesPrice.ControlSource = SalesPrice
End If
End Sub
Joan
I have a subform (in continuous forms view) upon which the control source
of one of its' controls is dependent upon the value of another control on
the form. For instance I want the control source of this control to be
ReturnedSalePrice2 if [Returned] Is Not Null, otherwise the control source
should be [SalesPrice]. I tried putting the following code in the subform's
OnLoad event but it doesn't work. I get #Name? in the control instead.
Should this not be on the OnLoad event of the subform? What am I doing
wrong?
Private Sub Form_Load()
If Not IsNull(Me.Returned) Then
Me.SalesPrice.ControlSource = ReturnedSalePrice2
Else
Me.SalesPrice.ControlSource = SalesPrice
End If
End Sub
Joan