If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Text controls that grow horizontally
I'm trying to create a text string comprised of various text controls for a
bibliography list. I need to format one of the controls (the title in italic) different from the others. I haven't found a way of doing this through the format function. I know that controls can grow vertically. Is there a way for controls to grow horizontally to allow for a text string? |
#2
|
|||
|
|||
Text controls that grow horizontally
If everything fits on one line, you might be able to use the Print method of
your report. Assuming you have two bound text boxes in your detail section for FirstName and LastName. You want them to display with a bold lastname followed by a non-bold firstname. Make both text boxes hiddent and use code like the following. The +50 determines the spacing between the lastname and firstname Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Me.CurrentY = Me.LastName.Top Me.CurrentX = Me.LastName.Left Me.FontBold = True Me.Print Me.LastName Me.FontBold = False Me.CurrentY = Me.LastName.Top Me.CurrentX = Me.CurrentX + 50 Me.Print Me.FirstName End Sub -- Duane Hookom Microsoft Access MVP "Rod" wrote: I'm trying to create a text string comprised of various text controls for a bibliography list. I need to format one of the controls (the title in italic) different from the others. I haven't found a way of doing this through the format function. I know that controls can grow vertically. Is there a way for controls to grow horizontally to allow for a text string? |
#3
|
|||
|
|||
Text controls that grow horizontally
Thanks Duane, for your reply. Unfortunately, at least half of the entries
will be more than one line. As you can imagine, this is a bit frustrating that Access doesn't provide formatting options in text strings. It is such an obvious need. I've looked at Leban's website. But I'd need to be a professional programmer to figure it out. That there isn't a simple, straightforward way to handle this common need is beyond me. Again, thanks for your suggestion. "Duane Hookom" wrote: If everything fits on one line, you might be able to use the Print method of your report. Assuming you have two bound text boxes in your detail section for FirstName and LastName. You want them to display with a bold lastname followed by a non-bold firstname. Make both text boxes hiddent and use code like the following. The +50 determines the spacing between the lastname and firstname Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Me.CurrentY = Me.LastName.Top Me.CurrentX = Me.LastName.Left Me.FontBold = True Me.Print Me.LastName Me.FontBold = False Me.CurrentY = Me.LastName.Top Me.CurrentX = Me.CurrentX + 50 Me.Print Me.FirstName End Sub -- Duane Hookom Microsoft Access MVP "Rod" wrote: I'm trying to create a text string comprised of various text controls for a bibliography list. I need to format one of the controls (the title in italic) different from the others. I haven't found a way of doing this through the format function. I know that controls can grow vertically. Is there a way for controls to grow horizontally to allow for a text string? |
#4
|
|||
|
|||
Text controls that grow horizontally
I haven't really found much of a need for Rich Text in my apps. The
functionality is available in most versions through either Leban's solution or I believe Access 2007. Whenever I need advanced formatting, I generally merge my Access records to Word. -- Duane Hookom Microsoft Access MVP "Rod" wrote: Thanks Duane, for your reply. Unfortunately, at least half of the entries will be more than one line. As you can imagine, this is a bit frustrating that Access doesn't provide formatting options in text strings. It is such an obvious need. I've looked at Leban's website. But I'd need to be a professional programmer to figure it out. That there isn't a simple, straightforward way to handle this common need is beyond me. Again, thanks for your suggestion. "Duane Hookom" wrote: If everything fits on one line, you might be able to use the Print method of your report. Assuming you have two bound text boxes in your detail section for FirstName and LastName. You want them to display with a bold lastname followed by a non-bold firstname. Make both text boxes hiddent and use code like the following. The +50 determines the spacing between the lastname and firstname Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Me.CurrentY = Me.LastName.Top Me.CurrentX = Me.LastName.Left Me.FontBold = True Me.Print Me.LastName Me.FontBold = False Me.CurrentY = Me.LastName.Top Me.CurrentX = Me.CurrentX + 50 Me.Print Me.FirstName End Sub -- Duane Hookom Microsoft Access MVP "Rod" wrote: I'm trying to create a text string comprised of various text controls for a bibliography list. I need to format one of the controls (the title in italic) different from the others. I haven't found a way of doing this through the format function. I know that controls can grow vertically. Is there a way for controls to grow horizontally to allow for a text string? |
Thread Tools | |
Display Modes | |
|
|