Reputation: 4274
I would like to set the caption of a frame dynamically inside a continuous form.
So far I am doing the following:
Private Sub Form_Load()
Me.myFrame.Caption = Me.created_date
End Sub
This only sets the value of the first record for all Frames. I want the frame to have the "creation_date" of each entry of my table.
What do I have to do to make the caption dynamic ? The Frame control does not have a "Data" binding like textfields, so I think that I have to set it programmatically.
Upvotes: 1
Views: 449
Reputation: 27634
You can't do this directly.
Unbound controls like the frame caption by definition have the same value for all records in a continuous form.
The only way is to use a bound control (textbox) as workaround, as shown by Darren.
Upvotes: 2
Reputation: 19817
Set the Record Source of your form to whichever table/query you're using.
Add the Option Group frame to the form and delete the label. Place a text box where the deleted label was and format as needed.
Give the text box a Control Source pointing to your date field and it should just work.
Upvotes: 2