Prev: Flickering/flashing when updating image or moving mouse ACC2007 Wi
Next: IIf statement to show A, B, C
From: Steve P Steve on 13 Apr 2010 13:55 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.
From: Dirk Goldgar on 13 Apr 2010 14:51 "Steve P" <Steve P(a)discussions.microsoft.com> wrote in message news:32E0219C-6D02-44AA-A292-38C2900F8F88(a)microsoft.com... > 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, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup)
From: Steve P on 13 Apr 2010 15:54
"Dirk Goldgar" wrote: > "Steve P" <Steve P(a)discussions.microsoft.com> wrote in message > news:32E0219C-6D02-44AA-A292-38C2900F8F88(a)microsoft.com... > > 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, MS Access MVP > Access tips: www.datagnostics.com/tips.html > > (please reply to the newsgroup) That works. Thank You! |