A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Text controls that grow horizontally



 
 
Thread Tools Display Modes
  #1  
Old August 21st, 2009, 01:38 PM posted to microsoft.public.access.reports
Rod
external usenet poster
 
Posts: 307
Default 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  
Old August 21st, 2009, 06:16 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default 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  
Old August 21st, 2009, 09:11 PM posted to microsoft.public.access.reports
Rod
external usenet poster
 
Posts: 307
Default 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  
Old August 21st, 2009, 09:30 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:04 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.