Format text box as Bulleted List as default

  • Thread starter Thread starter Steve P
  • Start date Start date
S

Steve P

In AC2007 I would like to have a text box (rich text format)
on my form automatically format the text that a user enters as a
bulleted list when they begin typing. Currently the user needs to
click the "Start a bulleted list" button on the ribbon before they
begin typing.
 
Steve P said:
In AC2007 I would like to have a text box (rich text format)
on my form automatically format the text that a user enters as a
bulleted list when they begin typing. Currently the user needs to
click the "Start a bulleted list" button on the ribbon before they
begin typing.


I haven't tried this out to see how it would work in practice, but you could
try something like this in the control's GotFocus event:

'------ start of (untried) code ------
Private Sub txtMyRichText_GotFocus

With Me.txtMyRichText
If Len(.Value & vbNullString) = 0 Then
.Value = "<ul><li></li></ul>"
End If
End With

End Sub
'------ end of (untried) code ------
 
Dirk Goldgar said:
I haven't tried this out to see how it would work in practice, but you could
try something like this in the control's GotFocus event:

'------ start of (untried) code ------
Private Sub txtMyRichText_GotFocus

With Me.txtMyRichText
If Len(.Value & vbNullString) = 0 Then
.Value = "<ul><li></li></ul>"
End If
End With

End Sub
'------ end of (untried) code ------

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)


That works.

Thank You!
 
Back
Top