Control Tip Text

P

Pap

I have a form with a control in it called 'Reference'. The form is a
continuous form and the control 'Reference' has differing 'Services' attached
to it. I wanted the Control Tip Text on the 'Reference' control to be the
'Service' control. The coding below does this in part:

Private Sub Reference_GotFocus()
Me.Reference.ControlTipText = Me.Service
End Sub

The problem I have is the Control Tip Text is only that which relates to the
'Reference' control that is currently selected. Is there any way of changing
the focus so that when a different 'Reference' control has the focus it is
selected and the Control Tip Text (control 'Service') changes to the relevant
one?
 
M

Mr. B

I have a form with a control in it called 'Reference'. The form is a
continuous form and the control 'Reference' has differing 'Services' attached
to it. I wanted the Control Tip Text on the 'Reference' control to be the
'Service' control. The coding below does this in part:

Private Sub Reference_GotFocus()
Me.Reference.ControlTipText = Me.Service
End Sub

The problem I have is the Control Tip Text is only that which relates to the
'Reference' control that is currently selected. Is there any way of changing
the focus so that when a different 'Reference' control has the focus it is
selected and the Control Tip Text (control 'Service') changes to the relevant
one?

Paul,

I may be missing something, but It sounds rather redundant to have the
control tip text to repeat the value that is selected form the same
control.

However, with that said, try using something like the following code
in the Current event of your form:

If Not IsNull(Me.Reference) Then
Me.Reference.ControlTipText = Me.Reference
End If

Using the On Current even will cause this code to re-assign the
control tip text to the control each time you move to a new record.

HTH

Mr B
 
P

Pap

I changed the '= Me.Reference' to '= Me.Service' and it works better than it
did, thanks. As an extra, is there any way of the record line selected
changing as you move the mouse pointer down the record lines. This way the
Control Tip Text would change automatically (I hope!).
 
M

Mr. B

I changed the '= Me.Reference' to '= Me.Service' and it works better than it
did, thanks. As an extra, is there any way of the record line selected
changing as you move the mouse pointer down the record lines. This way the
Control Tip Text would change automatically (I hope!).
--
Cheers.

Paul








- Show quoted text -

I had the feeling that you really wanted to reference a different
field when setting the value for your control tip.

As for setting the focus to the next record, a record has to be
selected in some manner. I'm not sure just how you are wanting the
record to get selected.

Do you have the "Record Selectors" property of your form set you
"Yes"? That might help.

Mr B
 
P

Pap

Yes, my record selectors is set to yes. Ideally I would like it so that a
record was sellected as the mouse pointer passed over it. I guess it's
something to do with the Got Focus or something but I would like it to do it
without having to press a mouse button!
 
M

Mr. B

Yes, my record selectors is set to yes. Ideally I would like it so that a
record was sellected as the mouse pointer passed over it. I guess it's
something to do with the Got Focus or something but I would like it to do it
without having to press a mouse button!
--
Cheers.

Paul









- Show quoted text -

The On Current event of your form only fires when you change records.
That is why you have to move between records for the control tip to be
updated.

I do not know of any kind of magic selector or even how to use mental
telepathy to switch between records. :>)

Good luck.

Mr B
 
S

Stephen Lebans

There are several methods to accomplish the effect you are looking for. A
couple of methods are here:

http://www.lebans.com/conformscurcontrol.htm
ContinuousFormsCurrentRow.zip is a class that allows you to programmatically
access the contents of a bound control, as the user moves their Mouse, but
the control does not have the focus. For Forms in Continuous View.

http://www.lebans.com/conditionalformatting.htm
A2KConditionalFormatting.zip is a sample MDB demonstrating how to
programmatically setup Conditional Formatting to simulate:

1) Highlighting of the Current Row for a Form in Continuous or Datasheet
View

2) Highlighting of Alternate Rows for a Form in Continuous or Datasheet View

Version 2.7

Added sample demonstrating how to achieve a background Hover/Highlighting of
rows for a form in Continuous view.

________________________________________________________

Finally, you could use the logic in the first solution and issue a DoCmd to
set the record under the mouse cursor as the current record.






--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top