Hi Gina,
I wouldn't type code for 42 controls unless there was absolutely no other
way to get it. At the very least, I'd put the data for the 42 captions into
a table and then load it from a recordset. I don't understand the
significance of 42 as the number of controls (6 Weeks w/ one control per
day??). I would work on developing an algorithm for filling the range of
dates based on a starting date.
--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
Gina Whipp wrote:
Sandra
You are exactly correct I am looping thru D1 > 42 and there is code
to set the days of the month. You go thru the months by pressing hte
PageUp and PageDown keys, so the captions change accordingly. And if
I understand you correctly, in essence I have to type code for all 42
controls. (I was trying to do it another way but that's okay.)
I do thank you for suggesting the tooltip file by Stephen Lebans.
Funny, I often send people there to find some tip and/or programming
sample and never thought to look myself! Well, to a typing I go.
Thanks again!
Gina
Hi Gina,
When/where/how are you setting the captions? Presumably at some
point you are looping through these controls and setting their
captions. Why not set their ControlTipText at the same time?
Regardless, here's some code you could put into the open event of
the form (or into whatever event make sense for your application)
Private Sub Form_Open(Cancel As Integer)
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.ControlType = acLabel Then
ctl.ControlTipText = ctl.Caption
End If
Next ctl
Set ctl = Nothing
End Sub
Also, since you are relying heavily on ControlTips, you might want to
investigate this custom class by Stephen Lebans. It adds some polish
and functionality to the builtin ControlTip property.
http://www.lebans.com/tooltip.htm
--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
Gina Whipp wrote:
Sandra,
I have made a calendar using labels that automatically shows
vacation days taken. It was easier to program the label.caption
property then the text.controlsource property. WHat I want to do
is since I can't make the label grow... when you move the mouse
over the label AND there is more text in the label then can show I
want to be able to program the label.controltip property to show.
However, I don't want to write 42 lines of code behind the form for
each one. I thought there might be a way to put a line of code in
the ControlTip Text in the Properties of the label. I provided
examples of what I put in there but it only shows what I typed not
what I told it to show.
Hope that makes better sense...
Gina
Hi Gina,
Where are you putting this? Are you trying to use the attached
label of a control to serve also as the tooltip for the control?
--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this
newsgroup.
Gina Whipp wrote:
I hope this is possible...
I have 42 labels on a form that are constantly changing. What I
want to do is put some piece of code on the ControlTip Text in
Properties to show me what's in each label as oppsed to writing 42
lines of code behind the form.
I tried =lbd22.caption AND Me.lbd22.caption AND
Forms!frmSchedule!lbd22.caption and none of those worked. SO
either I am missing something or this control cannot be used this
way.
As usual thanks for your help!
Gina