[AccessD] Creating a Bulleted List

A.D.Tejpal adtp at touchtelindia.net
Wed Oct 29 12:40:52 CST 2003


Rocky,

    Having aligned the tops of bullet label and the text box, you may like to ensure dynamic positioning and sizing of controls horizontally. Can grow & can shrink properties of detail section (as well as the controls in it) have to be Yes. Overlapping of any controls in design view may be avoided.

    Sample code is given below. TxtRmk is the main text box, while LbBT is the label containing the bullet. Hard values used in the sample code (incl Wd1 & Wd2) can be adjusted suitably so as to get the desired results.

Regards,
A.D.Tejpal
--------------
--------------
Code Start
--------------
Option Compare Database
Option Explicit
Const Wd1 As Integer = 400
Const Wd2 As Integer = 5000
--------------------------------------------------
Private Sub Detail_Format(Cancel As Integer, _
                                        FormatCount As Integer)
    TxtRmk.Width = 100     ' Safe value - to prevent 
'                                              error on a/c of space constaint.
    If BulletCriteria = "Y"  Then
        LbBT.Visible = True
        LbBT.Width = Wd1
        TxtRmk.Left = LbBT.Left + Wd1 + 100       ' A
        TxtRmk.Width = Wd2 - (Wd1 + 100)            ' B
    Else
        LbBT.Visible = False
        LbBT.Width = 0.01 * Wd1
        TxtRmk.Left = LbBT.Left + 0.01 * Wd1 + 100   ' C
        TxtRmk.Width = Wd2 - (0.01 * Wd1 + 100)        ' D
    End If
' Note - (A + B) should equal (C + D)
End Sub
--------------
Code End
--------------
  ----- Original Message ----- 
  From: Charlotte Foust 
  To: Access Developers discussion and problem solving 
  Sent: Wednesday, October 29, 2003 22:08
  Subject: RE: [AccessD] Creating a Bulleted List


  You probably had the textbox positioned slightly above the bullet.  Try
  top aligning them.

  Charlotte Foust

  -----Original Message-----
  From: Rocky Smolin - Beach Access Software [mailto:bchacc at san.rr.com] 
  Sent: Wednesday, October 29, 2003 7:51 AM
  To: Access Developers discussion and problem solving
  Subject: Re: [AccessD] Creating a Bulleted List


  Bob:

  That's exactly what I tried but the bullet always got repositioned below
  the text line after the text line grew.  I used the 'developer stupid'
  approach to solve it.  Realizing that there would always be a line of
  text I made the text line and the bullet the same height and turned the
  bullet on and off depending on the bullet flag of the detail line.  So
  avoided the whole problem instead of solving it.

  But I'm still a bit curious as to what you did different than me that
  made the bullet come out aligned top with the text line.

  Rocky

  ----- Original Message ----- 
  From: "William Hindman" <wdhindman at bellsouth.net>
  To: "Access Developers discussion and problem solving"
  <accessd at databaseadvisors.com>
  Sent: Tuesday, October 28, 2003 4:43 AM
  Subject: Re: [AccessD] Creating a Bulleted List


  > Bob
  >
  > ...nice approach ...but won't this always offset the text whether you 
  > show the bullet or not?
  >
  > William Hindman
  > <http://www.freestateproject.org> - Do you want liberty in your 
  > lifetime?
  >
  >
  > ----- Original Message -----
  > From: "Bob Gajewski" <rbgajewski at adelphia.net>
  > To: "Access Developers discussion and problem solving"
  > <accessd at databaseadvisors.com>
  > Sent: Tuesday, October 28, 2003 7:31 AM
  > Subject: RE: [AccessD] Creating a Bulleted List
  >
  >
  > > William
  > >
  > > ***************************************************
  > > Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

  > > If IsNull([txtTextBox]) or [txtTextBox] = "" Then txtBullet = Null
  > > txtBullet.Visible = False
  > > Else
  > > txtBullet = Chr(62) ' Just a sample using ">"
  > > txtBullet.Visible = True
  > > End If
  > > End Sub
  > > ***************************************************
  > >
  > > Be sure to set both txtBullet and txtTextBox to CanGrow=Yes and 
  > > CanShrink=Yes.
  > >
  > > Change the ASCII code to whatever you want actually displayed.
  > >
  > > Place the two text boxes on the same line on the report:
  > >
  > >  [_] [_____________________________]
  > >
  > > I use this coding in some of my reports, and it works fine.
  > >
  > > Regards,
  > > Bob Gajewski
  > >
  > >
  > >
  > > -----Original Message-----
  > > From: accessd-bounces at databaseadvisors.com
  > > [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of William 
  > > Hindman
  > > Sent: Tuesday, October 28, 2003 02:36
  > > To: Access Developers discussion and problem solving
  > > Subject: Re: [AccessD] Creating a Bulleted List
  > >
  > >
  > > ...picky, picky, picky :)
  > > ...how about using an image control for your bullet set for inline 
  > > with
  > your
  > > text box control? ...that should give you the effect you want ...HTH

  > > :)
  > >
  > > William Hindman
  > > <http://www.freestateproject.org> - Do you want liberty in your
  lifetime?
  > >
  > >
  > > ----- Original Message -----
  > > From: "Rocky Smolin - Beach Access Software" <bchacc at san.rr.com>
  > > To: "Access Developers discussion and problem solving" 
  > > <accessd at databaseadvisors.com>
  > > Sent: Tuesday, October 28, 2003 12:44 AM
  > > Subject: Re: [AccessD] Creating a Bulleted List
  > >
  > >
  > > > Well, I'm trying to gild the lily by making it look like a hanging
  > > indent -
  > > > that is, a multi-line section of text would all be left adjusted 
  > > > with
  > the
  > > > bullet to the left of the first line.  Just pre-pending the bullet

  > > > to
  > the
  > > > text will work, I suppose, if I can't get it to look like a 
  > > > bulleted
  > list
  > > in
  > > > a Word doc.
  > > >
  > > > Rocky
  > > >
  > > > ----- Original Message -----
  > > > From: "William Hindman" <wdhindman at bellsouth.net>
  > > > To: "Access Developers discussion and problem solving" 
  > > > <accessd at databaseadvisors.com>
  > > > Sent: Monday, October 27, 2003 1:58 PM
  > > > Subject: Re: [AccessD] Creating a Bulleted List
  > > >
  > > >
  > > > > ...since the "bullet" is really just a text character, why not
  > > concatenate
  > > > > it with the text using an IIF function to turn it on or off?
  > > > >
  > > > > William Hindman
  > > > > <http://www.freestateproject.org> - Do you want liberty in your
  > > lifetime?
  > > > >
  > > > >
  > > > > ----- Original Message -----
  > > > > From: "Rocky Smolin - Beach Access Software" <bchacc at san.rr.com>
  > > > > To: <AccessD at databaseadvisors.com>
  > > > > Sent: Monday, October 27, 2003 4:48 PM
  > > > > Subject: [AccessD] Creating a Bulleted List
  > > > >
  > > > >
  > > > >    Dear List:
  > > > >
  > > > > I have a report which is a number of pieces of boilerplate text
  which
  > > are
  > > > > printed in the detail section of a report.  There is also a
  > boilerplate
  > > > > header text.
  > > > >
  > > > > I set height of both to zero and the Can Grow property to true.

  > > > > So
  > far,
  > > > so
  > > > > good.  Formats nice.  The user can set the Bold, Underline, and
  Italic
  > > > > properties for each piece of boilerplate.
  > > > >
  > > > > Now he wants the option to add bullets to the detail text.  So I
  tried
  > > > > putting a bullet in a label, invisible, height zero, aligned top
  with
  > > the
  > > > > detail text.  If the text bullet property is set to True then I 
  > > > > make
  > the
  > > > > label visible and set the height to 225 twips.  All OK except 
  > > > > that
  > > because
  > > > > the text can grow, instead of coming out like this:
  > > > >
  > > > > (bullet)  Text One.
  > > > > (bullet)  Text Two.
  > > > >
  > > > > It comes out like this:
  > > > >
  > > > >              Text One.
  > > > > (bullet)
  > > > >              Text Two.
  > > > > (bullet)
  > > > >
  > > > > Is there a way to make this work or a better way to create a
  bulleted
  > > list
  > > > > in a report where the detail field may or may not be bulleted?
  > > > >
  > > > > MTIA,
  > > > >
  > > > > Rocky Smolin
  > > > > Beach Access Software 



More information about the AccessD mailing list