Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post

    Treeview Font Properties (Access 2007)

    I'm attempting to change the text display of my treeview while creating each node. In the following code, setting the the forecolor works fine, however on .Font.Italic = True I get "Object doesn't support this propertY" error at execution.

    Do Until rst.EOF
    With frm.tvTextOutline.Nodes.Add( Relationship:=tvwChild, Relative:="SecTitleID=" & CStr(rst!SecTitleID), Text:=rst!SubSectionSort & "> " & rst!SubSectionTitle, Key:="SubSecTitleID=" & CStr(rst!SubSecTitleID))
    If rst!fPrintSubSectionTitle = False Then
    .ForeColor = vbGrayText
    ElseIf rst!SubSecTitleID < 0 Then
    .Font.Italic = True
    End If
    End With
    rst.MoveNext
    Loop

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Treeview Font Properties (Access 2007)

    Font is not a property of the Node object. See the screenshot below, taken in the Object Browser; it shows all members of the Node object. You can set the Bold property of a node to True if you wish
    Attached Images Attached Images
    • File Type: png x.png (4.7 KB, 2 views)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •