
How to change caption on a sub from text on main form
How do I change a caption for a field on a subform from a control on the main
form? For example, on the main form I have a control called Misc1Name (this is
bound) and on the subform I have a field Misc1 and a label Misc1Label. When I
enter "Lace #" (no quotes) in Misc1Name, I want the caption for Misc1Label to
change on the subform to "Lace #" (no quotes).
I put the following in the OnCurrent of the subform:
Me.Misc1Label.Caption = Forms!ENTRYFORM2!Misc1Name
This worked except when I went to a record with a null value for Misc1Name, it
gave me an invalid use of null error.
So then, I entered this:
If Forms!ENTRYFORM2!Misc1Name Is Not Null Then
Me.Misc1Label.Caption = Forms!ENTRYFORM2!Misc1Name
End If
Now I get an Object Required error.
What do I do? Thanks in advance,
Doyle60