Bold Label `Caption` Property Fragment in VBA (Microsoft Access)

How to highlight a highlighted word in a Microsoft Access tag header?

If this helps, the text itself is saved in the Microsoft Access table.

The following is an example. I have a Microsoft Access form with a label, in the event Form_Load()I set the caption property of this shortcut to the value returned in the DLookup request, for example:

Private Sub Form_Load()

    Me.Label0.Caption = DLookup("Field1", "Table1", "[ID] = 1")

End Sub

My text is as follows:

Fast brown fox jumps over a lazy dog

I want to raise the word Lazy . Is it possible? If so, how to do it?

thank

+5
source share
2 answers

Access, 2007 (AFAIK) 2010, Rich Text. :

="The quick <b>brown</b> fox"

, Locked Enabled, , .

+5

? , .

-, html , -. (, , ), ControlSource - .

- , . , , , , .

"FakeLabel". - .

Private Sub Command113_Click()

    Dim sFile As String
    Dim lFile As String

    sFile = Environ("TEMP") & "\fakelabel.html"
    lFile = FreeFile

    Open sFile For Output As lFile

    Write #lFile, "The <strong>quick</strong> brown fox jumped over the <em>lazy</em> dog"

    Close lFile

    Me.Recordset.Edit
    Me.Recordset.Fields("FakeLabel").Value = sFile
    Me.Recordset.Update

    Me.WebBrowser112.Requery

End Sub

. , .

access form with web control serving as label

+3

All Articles