Subform Caption

J

JimS

I have a subform with a caption. I have an ON Load procedure that executes
the following code:

Private Sub Form_Load()
Me.Filter = "[sessionid] = '" & strSessionID & "'"
Me.FilterOn = True
Me.Caption = "Transactions for " & strSessionID
Me.Refresh
End Sub

Immediate window says the caption changed. Form does not show the revised
caption when it returns from this code. It never changes. At least what I
think is the caption doesn't change. It appeared by default at the top left
of the form when I designed it.

What's up?
 
V

Van T. Dinh

The Form's Caption of a Subform is never visible because it is in the window
caption bar (the blue bar at the top of each window) which is not visible
for a Subform.

I think you actually want to change the Caption of a Label Control which is
associated with the Subform Control. This Label is associated with the
Subform*Control* and is just a Label on the main Form.
 
Top