ControlTip Text

  • Thread starter Thread starter Gina Whipp
  • Start date Start date
G

Gina Whipp

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
 
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,

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

Sandra Daigle said:
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 said:
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
 
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 said:
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

Sandra Daigle said:
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 said:
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
 
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


Sandra Daigle said:
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 said:
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

Sandra Daigle said:
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
 
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 said:
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


Sandra Daigle said:
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 said:
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
 
Sandra,

A simpet of the code....

Do Until D3 > 42 'Goes thru all the calendar days setting the dates
Me("C" & Format(D3, "00")) = day(D1)
Me("lbd" & Format(D3, "00")).Caption = day(D1)
If Month(D1) <> Month(Me![scrCDate]) Then
Me("C" & Format(D3, "00")).ForeColor = 8421504
Me("lbd" & Format(D3, "00")).Caption = "GGG"
Me("lbd" & Format(D3, "00")).Visible = False
Else
Me("C" & Format(D3, "00")).ForeColor = 0 'Black
Me("lbd" & Format(D3, "00")).ForeColor = 0
Me("lbd" & Format(D3, "00")).Visible = True
End If

I have labels that display ie: 2
Gina-VD
Sandra-DO
On top of the label is a control button set to transparent, so that when
you click you can add someone else who might be taking a vacation day. I
couldn't get the coding to put dates and vacations days in the same box, oh
and allow a double click. Looks like alot but the coding is only a page and
half long. But since the calendar changes I can't store the captions in a
table because depending on what month you're in and who's off that day will
depend on what the caption is for that day. I hope this is making sense....
See below for how the captions are changed

Me("lbd" & irow & icol).Caption = Me("lbd" & irow &
icol).Caption & vbCrLf & rs!NameActivity

So in essence I was hoping to write a similar line to produce control tips
to to the same. After looking at Stephen Lebans tool tip file I might be
able to use that thereby typing one line because I really don't want to type
42 lines either.

Oh, and yep I need 42 controls to make this calendar work because depending
on the month will depend where is starts; ie look at August 2003 there are 6
weeks involved.

Gina



Sandra Daigle said:
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 said:
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


Sandra Daigle said:
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
 
Not to butt in <g> but if your label names are numbered like:

lbl1, lbl2, lbl3 ... lbl42

you can fake a control array by referring to them like:

Dim frm As Form
Dim ctl As Control
Dim i As Integer
Set frm = Me

For i = 1 to 42
Set ctl = frm("lbl" & i)
MsgBox ctl
Next i

which should make it easier to write your code.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Gina Whipp said:
Sandra,

A simpet of the code....

Do Until D3 > 42 'Goes thru all the calendar days setting the dates
Me("C" & Format(D3, "00")) = day(D1)
Me("lbd" & Format(D3, "00")).Caption = day(D1)
If Month(D1) <> Month(Me![scrCDate]) Then
Me("C" & Format(D3, "00")).ForeColor = 8421504
Me("lbd" & Format(D3, "00")).Caption = "GGG"
Me("lbd" & Format(D3, "00")).Visible = False
Else
Me("C" & Format(D3, "00")).ForeColor = 0 'Black
Me("lbd" & Format(D3, "00")).ForeColor = 0
Me("lbd" & Format(D3, "00")).Visible = True
End If

I have labels that display ie: 2
Gina-VD
Sandra-DO
On top of the label is a control button set to transparent, so that when
you click you can add someone else who might be taking a vacation day. I
couldn't get the coding to put dates and vacations days in the same box, oh
and allow a double click. Looks like alot but the coding is only a page and
half long. But since the calendar changes I can't store the captions in a
table because depending on what month you're in and who's off that day will
depend on what the caption is for that day. I hope this is making sense....
See below for how the captions are changed

Me("lbd" & irow & icol).Caption = Me("lbd" & irow &
icol).Caption & vbCrLf & rs!NameActivity

So in essence I was hoping to write a similar line to produce control tips
to to the same. After looking at Stephen Lebans tool tip file I might be
able to use that thereby typing one line because I really don't want to type
42 lines either.

Oh, and yep I need 42 controls to make this calendar work because depending
on the month will depend where is starts; ie look at August 2003 there are 6
weeks involved.

Gina



Sandra Daigle said:
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 said:
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
 
Sandra & Arvin

Actually I got the code line right after looking at Lebans tool tip I had a
brainstorm...

Me("lbd" & irow & icol).ControlTipText = Me("lbd" & irow &
icol).ControlTipText & vbCrLf & rs!ActivityName

Well, I got excited and hoped that would work BUT, there's always a but,
once you change the calendar to another month it retains the control tip
from the previous month. It is like it is ignoring the rs!ActivityName,
which works fine for the label caption. ie, the 6th of September whipp-vd
will also show on October 6th even though no vacation day was taken.

Oh, and Arvin, I'll take all the help I can get. 8-)

Thanks to ANYONE who wants to pitch in an idea.
Gina

Arvin Meyer said:
Not to butt in <g> but if your label names are numbered like:

lbl1, lbl2, lbl3 ... lbl42

you can fake a control array by referring to them like:

Dim frm As Form
Dim ctl As Control
Dim i As Integer
Set frm = Me

For i = 1 to 42
Set ctl = frm("lbl" & i)
MsgBox ctl
Next i

which should make it easier to write your code.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Gina Whipp said:
Sandra,

A simpet of the code....

Do Until D3 > 42 'Goes thru all the calendar days setting the dates
Me("C" & Format(D3, "00")) = day(D1)
Me("lbd" & Format(D3, "00")).Caption = day(D1)
If Month(D1) <> Month(Me![scrCDate]) Then
Me("C" & Format(D3, "00")).ForeColor = 8421504
Me("lbd" & Format(D3, "00")).Caption = "GGG"
Me("lbd" & Format(D3, "00")).Visible = False
Else
Me("C" & Format(D3, "00")).ForeColor = 0 'Black
Me("lbd" & Format(D3, "00")).ForeColor = 0
Me("lbd" & Format(D3, "00")).Visible = True
End If

I have labels that display ie: 2
Gina-VD
Sandra-DO
On top of the label is a control button set to transparent, so that when
you click you can add someone else who might be taking a vacation day. I
couldn't get the coding to put dates and vacations days in the same box, oh
and allow a double click. Looks like alot but the coding is only a page and
half long. But since the calendar changes I can't store the captions in a
table because depending on what month you're in and who's off that day will
depend on what the caption is for that day. I hope this is making sense....
See below for how the captions are changed

Me("lbd" & irow & icol).Caption = Me("lbd" & irow &
icol).Caption & vbCrLf & rs!NameActivity

So in essence I was hoping to write a similar line to produce control tips
to to the same. After looking at Stephen Lebans tool tip file I might be
able to use that thereby typing one line because I really don't want to type
42 lines either.

Oh, and yep I need 42 controls to make this calendar work because depending
on the month will depend where is starts; ie look at August 2003 there
are
6
weeks involved.

Gina



Sandra Daigle said:
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
 
Gina,

Hi!

I know it may be a bit forward and presumptuous of me....but I was wondering...

You see, I am trying to create a form for a database I am working on, that will
display a calendar and show which employees are / were absent on annual leave
etc. for each day in a month. This would then be linked into a calculation for
each employees annual leave entitlement, and show them how many days leave they
have taken / left. I have posted requests for help on several NGs, and have
received numerous replies--all of which I am eternally thankful for--however,
none of the suggestions / methods have satisfied all the criteria for the form.

After reading your post, I was wondering--and this where the forward and
presumptuous part comes in ;)--if you would mind sending me the form you use and
the code behind it? Yes, it is rather forward, yes it is a bit of a cheek to
ask this of you. However--start violins playing--I have been trying to get this
part of the database working for over a month now, and every time I try it, I
hit against a brick wall.

I appreciate that you may not be willing to give away your code / hard work, but
all I can do is ask. I will not hold any malice / grudge against you.

Thank you for your time.

Rgds

Duncan

--
"In cases of major discrepancy it's always reality that's got it
wrong....reality is frequently inaccurate."
~ Douglas Adams

Gina Whipp said:
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

Sandra Daigle said:
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 said:
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
 
Just a thought to consider-

Make a table with the names of the labels you want the control tip text for.
Add records with a series number, and the actual control tip text. Then
whenever you want to load a new set of control tips, you loop through the
recordset of that table, filtered on the series number, and load all the
control tips into their labels by label name. All the code for doing that
need only to be in a function in a public module, then you can call it with
one line from wherever you want to update the tooltips, passing the series
number as a parameter. Do you follow ?

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
Gina Whipp said:
Sandra & Arvin

Actually I got the code line right after looking at Lebans tool tip I had a
brainstorm...

Me("lbd" & irow & icol).ControlTipText = Me("lbd" & irow &
icol).ControlTipText & vbCrLf & rs!ActivityName

Well, I got excited and hoped that would work BUT, there's always a but,
once you change the calendar to another month it retains the control tip
from the previous month. It is like it is ignoring the rs!ActivityName,
which works fine for the label caption. ie, the 6th of September whipp-vd
will also show on October 6th even though no vacation day was taken.

Oh, and Arvin, I'll take all the help I can get. 8-)

Thanks to ANYONE who wants to pitch in an idea.
Gina

Arvin Meyer said:
Not to butt in <g> but if your label names are numbered like:

lbl1, lbl2, lbl3 ... lbl42

you can fake a control array by referring to them like:

Dim frm As Form
Dim ctl As Control
Dim i As Integer
Set frm = Me

For i = 1 to 42
Set ctl = frm("lbl" & i)
MsgBox ctl
Next i

which should make it easier to write your code.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Gina Whipp said:
Sandra,

A simpet of the code....

Do Until D3 > 42 'Goes thru all the calendar days setting the dates
Me("C" & Format(D3, "00")) = day(D1)
Me("lbd" & Format(D3, "00")).Caption = day(D1)
If Month(D1) <> Month(Me![scrCDate]) Then
Me("C" & Format(D3, "00")).ForeColor = 8421504
Me("lbd" & Format(D3, "00")).Caption = "GGG"
Me("lbd" & Format(D3, "00")).Visible = False
Else
Me("C" & Format(D3, "00")).ForeColor = 0 'Black
Me("lbd" & Format(D3, "00")).ForeColor = 0
Me("lbd" & Format(D3, "00")).Visible = True
End If

I have labels that display ie: 2
Gina-VD
Sandra-DO
On top of the label is a control button set to transparent, so that when
you click you can add someone else who might be taking a vacation day. I
couldn't get the coding to put dates and vacations days in the same
box,
oh
and allow a double click. Looks like alot but the coding is only a
page
and
half long. But since the calendar changes I can't store the captions
in
a to
type are
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
 
That would work if the data entered in the controltip was constant but it is
not; it changes depending on the month that is showing and what activities
have been selected for each particular employee each particular month...

I actually had to sit down and rethink how I was doing my calendar and
instead of using labels with controltips, which I could not find a way to
refresh or repaint labels I rewrote the code using text boxes with scroll
boxes eliminating the need for controltips.

I do thank you and everyone for their help/suggestions, I don't believe I
would have rethought the way I was doing the calendar had it not been for
everyones input. Sometimes the answer to a problem is to rethink the
problem...

Gina


Adrian Jansen said:
Just a thought to consider-

Make a table with the names of the labels you want the control tip text for.
Add records with a series number, and the actual control tip text. Then
whenever you want to load a new set of control tips, you loop through the
recordset of that table, filtered on the series number, and load all the
control tips into their labels by label name. All the code for doing that
need only to be in a function in a public module, then you can call it with
one line from wherever you want to update the tooltips, passing the series
number as a parameter. Do you follow ?

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
Gina Whipp said:
Sandra & Arvin

Actually I got the code line right after looking at Lebans tool tip I
had
a
brainstorm...

Me("lbd" & irow & icol).ControlTipText = Me("lbd" & irow &
icol).ControlTipText & vbCrLf & rs!ActivityName

Well, I got excited and hoped that would work BUT, there's always a but,
once you change the calendar to another month it retains the control tip
from the previous month. It is like it is ignoring the rs!ActivityName,
which works fine for the label caption. ie, the 6th of September whipp-vd
will also show on October 6th even though no vacation day was taken.

Oh, and Arvin, I'll take all the help I can get. 8-)

Thanks to ANYONE who wants to pitch in an idea.
Gina

Arvin Meyer said:
Not to butt in <g> but if your label names are numbered like:

lbl1, lbl2, lbl3 ... lbl42

you can fake a control array by referring to them like:

Dim frm As Form
Dim ctl As Control
Dim i As Integer
Set frm = Me

For i = 1 to 42
Set ctl = frm("lbl" & i)
MsgBox ctl
Next i

which should make it easier to write your code.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Sandra,

A simpet of the code....

Do Until D3 > 42 'Goes thru all the calendar days setting the dates
Me("C" & Format(D3, "00")) = day(D1)
Me("lbd" & Format(D3, "00")).Caption = day(D1)
If Month(D1) <> Month(Me![scrCDate]) Then
Me("C" & Format(D3, "00")).ForeColor = 8421504
Me("lbd" & Format(D3, "00")).Caption = "GGG"
Me("lbd" & Format(D3, "00")).Visible = False
Else
Me("C" & Format(D3, "00")).ForeColor = 0 'Black
Me("lbd" & Format(D3, "00")).ForeColor = 0
Me("lbd" & Format(D3, "00")).Visible = True
End If

I have labels that display ie: 2
Gina-VD
Sandra-DO
On top of the label is a control button set to transparent, so that when
you click you can add someone else who might be taking a vacation
day.
I
couldn't get the coding to put dates and vacations days in the same box,
oh
and allow a double click. Looks like alot but the coding is only a page
and
half long. But since the calendar changes I can't store the
captions
in
a
table because depending on what month you're in and who's off that day
will
depend on what the caption is for that day. I hope this is making
sense....
See below for how the captions are changed

Me("lbd" & irow & icol).Caption = Me("lbd" & irow &
icol).Caption & vbCrLf & rs!NameActivity

So in essence I was hoping to write a similar line to produce
control
tips
to to the same. After looking at Stephen Lebans tool tip file I
might
be
able to use that thereby typing one line because I really don't want to
type
42 lines either.

Oh, and yep I need 42 controls to make this calendar work because
depending
on the month will depend where is starts; ie look at August 2003
there
are
6
weeks involved.

Gina



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 form
for
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 writing
 
Duncan,

Actually nto forward at all, why re-event the wheel...

The form I am working on is actually a sample database I downloaded sometime
ago and am now trying to rework to show sort of what you are trying to show.
I orginally tried to get in touch with the original programmer but his site
is no longer online and a search of his name turned up nothing (and he
didn't put his name in the comments). So, I spent a month figuring out what
he was doing and then recoding it to do what I wanted. And it is far from
where I want it but it's a lot closer.

I say all this to say, giving my part of the code is no problem but not sure
how I go about giving up someone elses code I got at least 5 years ago and
can't find. It was a sample database, free to download and play but who do
you ask? (I should also note that this code is FAR from finished and the
code is rough and full of issues and useless lines.)

Let me ask around and make sure I'm not breaking any 'rules'. I don't think
so because I originally tried to find the guy but one never knows...

Gina


Duncan Edment said:
Gina,

Hi!

I know it may be a bit forward and presumptuous of me....but I was wondering...

You see, I am trying to create a form for a database I am working on, that will
display a calendar and show which employees are / were absent on annual leave
etc. for each day in a month. This would then be linked into a calculation for
each employees annual leave entitlement, and show them how many days leave they
have taken / left. I have posted requests for help on several NGs, and have
received numerous replies--all of which I am eternally thankful for--however,
none of the suggestions / methods have satisfied all the criteria for the form.

After reading your post, I was wondering--and this where the forward and
presumptuous part comes in ;)--if you would mind sending me the form you use and
the code behind it? Yes, it is rather forward, yes it is a bit of a cheek to
ask this of you. However--start violins playing--I have been trying to get this
part of the database working for over a month now, and every time I try it, I
hit against a brick wall.

I appreciate that you may not be willing to give away your code / hard work, but
all I can do is ask. I will not hold any malice / grudge against you.

Thank you for your time.

Rgds

Duncan

--
"In cases of major discrepancy it's always reality that's got it
wrong....reality is frequently inaccurate."
~ Douglas Adams

Gina Whipp said:
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

Sandra Daigle said:
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
 
Duncan,

I got a heads up to send it to you... so how do you want it?


Duncan Edment said:
Gina,

Hi!

I know it may be a bit forward and presumptuous of me....but I was wondering...

You see, I am trying to create a form for a database I am working on, that will
display a calendar and show which employees are / were absent on annual leave
etc. for each day in a month. This would then be linked into a calculation for
each employees annual leave entitlement, and show them how many days leave they
have taken / left. I have posted requests for help on several NGs, and have
received numerous replies--all of which I am eternally thankful for--however,
none of the suggestions / methods have satisfied all the criteria for the form.

After reading your post, I was wondering--and this where the forward and
presumptuous part comes in ;)--if you would mind sending me the form you use and
the code behind it? Yes, it is rather forward, yes it is a bit of a cheek to
ask this of you. However--start violins playing--I have been trying to get this
part of the database working for over a month now, and every time I try it, I
hit against a brick wall.

I appreciate that you may not be willing to give away your code / hard work, but
all I can do is ask. I will not hold any malice / grudge against you.

Thank you for your time.

Rgds

Duncan

--
"In cases of major discrepancy it's always reality that's got it
wrong....reality is frequently inaccurate."
~ Douglas Adams

Gina Whipp said:
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

Sandra Daigle said:
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
 
I saw your post on public.access and think you were probably right to ask the
question. I'm glad the answer was YES!!

The best way for me to receive it would be in ZIP file format, to my e-mail
address in the header--removing the obvious of course. I'd appreciate it--here
we go again, more presumptiousnessssss!!!--if you could send me the original
file(s), if you still have them, as well as your modified one(s). If you no
longer have the originals, it doesn't matter.

I thank you for your time, patience and efforts and I await your e-mail.

Kind regards

Duncan

--
"You must pursue this investigation of Watergate even if it leads to the
president.
I'm innocent. You've got to believe I'm innocent. If you don't, take my job."
~ Richard Milhouse Nixon

Gina Whipp said:
Duncan,

I got a heads up to send it to you... so how do you want it?


Duncan Edment said:
Gina,

Hi!

I know it may be a bit forward and presumptuous of me....but I was wondering...

You see, I am trying to create a form for a database I am working on, that will
display a calendar and show which employees are / were absent on annual leave
etc. for each day in a month. This would then be linked into a calculation for
each employees annual leave entitlement, and show them how many days leave they
have taken / left. I have posted requests for help on several NGs, and have
received numerous replies--all of which I am eternally thankful for--however,
none of the suggestions / methods have satisfied all the criteria for the form.

After reading your post, I was wondering--and this where the forward and
presumptuous part comes in ;)--if you would mind sending me the form you use and
the code behind it? Yes, it is rather forward, yes it is a bit of a cheek to
ask this of you. However--start violins playing--I have been trying to get this
part of the database working for over a month now, and every time I try it, I
hit against a brick wall.

I appreciate that you may not be willing to give away your code / hard work, but
all I can do is ask. I will not hold any malice / grudge against you.

Thank you for your time.

Rgds

Duncan

--
"In cases of major discrepancy it's always reality that's got it
wrong....reality is frequently inaccurate."
~ Douglas Adams

Gina Whipp said:
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
 
On its way... has my name in the subject line...


Duncan Edment said:
I saw your post on public.access and think you were probably right to ask the
question. I'm glad the answer was YES!!

The best way for me to receive it would be in ZIP file format, to my e-mail
address in the header--removing the obvious of course. I'd appreciate it--here
we go again, more presumptiousnessssss!!!--if you could send me the original
file(s), if you still have them, as well as your modified one(s). If you no
longer have the originals, it doesn't matter.

I thank you for your time, patience and efforts and I await your e-mail.

Kind regards

Duncan

--
"You must pursue this investigation of Watergate even if it leads to the
president.
I'm innocent. You've got to believe I'm innocent. If you don't, take my job."
~ Richard Milhouse Nixon

Gina Whipp said:
Duncan,

I got a heads up to send it to you... so how do you want it?


Duncan Edment said:
Gina,

Hi!

I know it may be a bit forward and presumptuous of me....but I was wondering...

You see, I am trying to create a form for a database I am working on,
that
will
display a calendar and show which employees are / were absent on
annual
leave
etc. for each day in a month. This would then be linked into a calculation for
each employees annual leave entitlement, and show them how many days
leave
they
have taken / left. I have posted requests for help on several NGs,
and
have
received numerous replies--all of which I am eternally thankful for--however,
none of the suggestions / methods have satisfied all the criteria for
the
form.
After reading your post, I was wondering--and this where the forward and
presumptuous part comes in ;)--if you would mind sending me the form
you
use and
the code behind it? Yes, it is rather forward, yes it is a bit of a
cheek
to
ask this of you. However--start violins playing--I have been trying
to
get this
part of the database working for over a month now, and every time I
try
it, I
hit against a brick wall.

I appreciate that you may not be willing to give away your code / hard work, but
all I can do is ask. I will not hold any malice / grudge against you.

Thank you for your time.

Rgds

Duncan

--
"In cases of major discrepancy it's always reality that's got it
wrong....reality is frequently inaccurate."
~ Douglas Adams

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
 
Just a thought to consider-

Make a table with the names of the labels you want the control tip text for.
Add records with a series number, and the actual control tip text. Then
whenever you want to load a new set of control tips, you loop through the
recordset of that table, filtered on the series number, and load all the
control tips into their labels by label name. All the code for doing that
need only to be in a function in a public module, then you can call it with
one line from wherever you want to update the tooltips, passing the series
number as a parameter. Do you follow ?

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
Back
Top