Solved Me.ControlTipText

MattBaldry

Self Taught, Learn from the Forums
Local time
Today, 02:12
Joined
Feb 5, 2019
Messages
325
Hi all,

Is there any way of adding line breaks into a control tip text? I have a lovely new continuous form setup that I have built using tips from here.

I have go the ControlTipText to change to display the selected record, which is great. But ideally I want to display it on different lines.

Code:
    Dim strControlTipText As String
        strControlTipText = "Selected Record" & _
                            "Customer: " & [Customer] & _
                            "Production Group: " & [Production Group] & _
                            "Works Order: " & [Works Order Reference] & _
                            "Stock Code: " & [Stock Code]

But this all displays as a single line. I have looked around and cannot see anyone who has this working via VBA. Plenty of people have line breaks with a fixed ControlTipText, but I want this to be dynamic with the selected record.

~Matt
 
Solved. Just used & vbcrlf & and it worked. I had tried that, but must have typed it incorrectly.

Code:
    Dim strControlTipText As String
        strControlTipText = "Selected Record" & vbCrLf & _
                            "Customer: " & [Customer] & vbCrLf & _
                            "Production Group: " & [Production Group] & vbCrLf & _
                            "Works Order: " & [Works Order Reference] & vbCrLf & _
                            "Stock Code: " & [Stock Code]

Solved by finding a typo.

~Matt
 

Users who are viewing this thread

Back
Top Bottom