Hi All,
So I'm trying to make a TextBox Control that I can add 'fancy' styling and margins to. I am querying my database and I'm hoping to systematically add text to this TextBox as I step through my recordset. The end product I'm aiming for is a bulleted list. Headers of each list will be Bold, Underlined, Both, or Plain based on some simple if-else logic. The bulleted list will include bullets and proper margins to force the text to wrap in the correct manner. Sounds great in my head.
Here are my problems:
1) I don't how to systematically add text to a TextBox. I understand that you can do something along the lines of
Me.txtbox.Text = "Header1"
Me.txtbox.Text = Me.txtbox.Text + vbCrLf
Me.txtbox.Text = Me.txtbox.Text & " - Bullet 1"
Me.txtbox.Text = Me.txtbox.Text + vbCrLf
Me.txtbox.Text = Me.txtbox.Text & " - Bullet 2"
Using this method if change the style of the text (i.e. Me.txtbox.Font.Bold = True) it will change the entire TextBox since I am importing the characters as one string... I want to control where and what is styled.
2) I have no clue how to use/write in rtf. If I make one giant string with all the needed rtf "tags" to designate styling or margins can I just set the Me.txtbox.Text = superLongRtfString with the Rich Text property set on this textbox?
3) I have the feeling that this is the wrong way to pursue this problem and reports might be a better option. However, I know nothing about reports. So I figured I'd ask you guys to see if anyone has a better way to approach this problem.
Thank you.