Dynamic ControlTip Text?

M

Mrs. Ugh

I am trying to find a way to display some additional details about a record
when the user holds their mouse over a particular field (like displaying the
definition of a word when you hold the mouse over it). I am picturing
something like the ControlTip Text, but I need it to show the details for the
record they have their mouse over, which may or may not be the current
record. I currently open a small pop-up form if they double-click the field,
but it is more cumbersome than I would like. Anyone have any ideas on how to
do this?
Thanks,
Jill
 
D

Dirk Goldgar

Mrs. Ugh said:
I am trying to find a way to display some additional details about a record
when the user holds their mouse over a particular field (like displaying
the
definition of a word when you hold the mouse over it). I am picturing
something like the ControlTip Text, but I need it to show the details for
the
record they have their mouse over, which may or may not be the current
record. I currently open a small pop-up form if they double-click the
field,
but it is more cumbersome than I would like. Anyone have any ideas on how
to
do this?
Thanks,
Jill


Stephen Lebans has a custom tooltip class posted here:

http://www.lebans.com/tooltip.htm

I think it can be used to do what you want.
 
D

Damon Heron

With a datasheet, controltip won't work. But here is a nice workaround,
using the dbl-clk event of a field:

In a module, put this code:
Public Sub frmMsg(myMsg As String)
DoCmd.openform "frmdlgMsg", , OpenArgs:=myMsg
End Sub

Private Sub Other_DblClick(Cancel As Integer)
Call frmMsg("This has a Capacity of : " & Me.Capacity & "Tons.")
End Sub

Now we only need to create the form, frmdlgMsg.

Design a small form, border style none or ??, Set timerinterval in
properties to whatever time you want the msg to appear on screen (5000 is 5
seconds), add a label with a generic msg, and put this code on the form:

Private Sub Form_Load()
If Me.OpenArgs <> vbNullString Then
Me.lblMsg.Caption = Me.OpenArgs
End If
End Sub

Private Sub Form_Timer()
DoCmd.Close acForm, Me.Name
End Sub

That's all there is to it. The advantage to this approach is it saves a
click event in that the user doesn't have to close the form. You could also
code it so the msg appears when the user enters a particular field, but this
can be annoying. Your msg can be as simple as my example, or as complex as
you need it. It will always refer to the current record's fields. I am
guessing that you want to have info available for the user but that is
hidden normally.

Damon
 
M

Mrs. Ugh

Thanks. This is a great work-around until I check out the other
recommendation. And sorry about the repeat posts - the system said it was
down and my post did not go through.
 
D

Damon Heron

I believe the LeBans tool tip requires a form header, so would not work on a
datasheet. Correct me if I am wrong. I use the Lebans myself - on forms I
have a label that when moused over, the tool tip displays. It works great
for regular help info for the form. The help text is saved in a table. I
can't imagine how this would be used to have information about individual
records, but perhaps.........

Damon
 
B

Bob Quintal

I believe the LeBans tool tip requires a form header, so would not
work on a datasheet. Correct me if I am wrong. I use the Lebans
myself - on forms I have a label that when moused over, the tool
tip displays. It works great for regular help info for the form.
The help text is saved in a table. I can't imagine how this would
be used to have information about individual records, but
perhaps.........

Damon

I used Stephen's wonderful ToolTip code to create a popup form with
3 cascading combo boxes that display item specific information for
each row in the dropdown portion of each combo, as you hover over
that row. Displayed data comes from a memo field in each table that
is a combo box rowsource

Bob Q
 

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

Similar Threads


Top