I made a user control to gather usa address information and would like
to know why the following doesn't work (I am assigning the valid of
textbox in a second instance of the control from the first instance of
the control) The textboxes hold date values.
If Len(USAAddress1.ValidFromCur) > 0 Then
USAAddress2.ValidFromCur = USAAddress1.ValidFromCur
End If
Here is the Property method in the user control's class file:
Public Property ValidFromCur()
Get
Return Me.txtValidFromCur
End Get
Set(ByVal Value)
Me.txtValidFromCur.Text = Value
End Set
End Property
Public Property ValidToCur()
Get
Return Me.txtValidToCur
End Get
Set(ByVal Value)
Me.txtValidToCur.Text = Value
End Set
End Property
For the other child controls there is no problem with this. I can
assign things such as Street Address 1, City, etc.
The only way this works is if I append ".text", such as
If Len(USAAddress1.ValidFromCur.Text) > 0 Then
USAAddress2.ValidFromCur.Text = USAAddress1.ValidFromCur.Text
End If
This *bugs* me because I considered I've already done this in the above
property method...Can someone help? What is the *proper* way to do
this?
Thank you. (very much)