Hoover Over Textbox Display Text In Textbox (1 Viewer)

monkeyman77

Registered User.
Local time
Today, 06:55
Joined
Nov 30, 2016
Messages
47
Hello,

I am struggling with this one..... and can't seem to find a good examples anywhere so I am hoping someone can help me out.

I am attempting to have my database display the values in the textboxes that are too long in a pop up display when the users hover the mouse over it.

The database I am working on is set up similar to the attached example one. My main form has a bunch of sub-forms on it and the notes column in each is what I need the hover feature for. I can do it with controltip text but I am hoping for a quicker way because this isn't going to be for just one form.

Thank you,
Steven
 

Attachments

  • Hover Example.accdb
    464 KB · Views: 91

CJ_London

Super Moderator
Staff member
Local time
Today, 14:55
Joined
Feb 19, 2013
Messages
16,611
do you mean like using the shift-F2 functionality?
 

monkeyman77

Registered User.
Local time
Today, 06:55
Joined
Nov 30, 2016
Messages
47
That works but I was looking for something that users wouldn't have to remember how to do. From the google searching I've been doing there is a way to have users double click the cell or move the mouse over the cell and have a display popup. I am just having trouble figuring out how to do it.
 

monkeyman77

Registered User.
Local time
Today, 06:55
Joined
Nov 30, 2016
Messages
47
I found a post that said this code would work:

Private Sub Form_Current()

Dim ctl As Control

For Each ctl In Forms(Me.Name)
Select Case ctl.ControlType
Case acTextBox
If Not IsNull(ctl) Then
ctl.ControlTipText = ctl.Value
'ctl.SetFocus
'DoCmd.RunCommand acCmdCopy
End If
Case acCheckBox
'do nothing
Case acComboBox
'do nothing
Case acListBox
'do nothing
Case acOptionGroup
'do nothing
Case Else
'do nothing for the other controls
End Select
Next ctl

End Sub



But i can't seem to get it to run correctly in my module. (I'm not very good with VBA, really just a beginner)


-Steven
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:55
Joined
Feb 19, 2013
Messages
16,611
assuming your form is a continuous form, you would need to open a separate popup form which then need to be closed by the user before they move on. To do this on the mouse move event means the users will never get anywhere.

If you don't want to train users to use Shift F2 To open the form opened by using shift F2 on say a double click event you would use

RunCommand acCmdZoomBox

Alternatively, if you have room in your form header or footer, create a large text box and set the control source to the name of your memo field. Then when the user clicks on the memo field it will be populated automatically.

Or if it is for multiple memo controls, make the large box unbound and in the click or gotfocus event put some code to assign controlsource or the control value at that point. Note if the large textbox is on a main form, and the memo control is on a subform it will not be editable from the large textbox.

The problem with mousemove on a continuous form is the event is triggered for each row, but the value of that will be 'reported' is in the record which has the focus (by clicking on it).

You could investigate using the recordsetclone property if you can find a way of identifying which row the mouse is hovering over at the time. Regret I can't help with that, but there may be others who have some suggestions.
 

Grumm

Registered User.
Local time
Today, 15:55
Joined
Oct 9, 2015
Messages
395
I solved this problem once by not using the database list view.
I just created a normal form with all the lines on it. Then i could set the Controltiptext of the text box to the same value as the textbox. Then hover over it will show all the text.
(Warning : max length of the ControlTipText is 255...)
 

monkeyman77

Registered User.
Local time
Today, 06:55
Joined
Nov 30, 2016
Messages
47
CJ, the larger textbox sounds like a good idea but i'm not sure how to do that.

Grumm, I don't think I am follow your suggestion...
 

Users who are viewing this thread

Top Bottom