Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Binary Universe
    Posts
    57

    Unanswered: Blank lines in a List Box

    Code:

    List1.RowSource = "SELECT field1, field2 FROM table1, table2 WHERE table1.record_ID = table2.record_ID"

    Question:

    Is there a way to insert blank lines between records pulled out by an SQL statement so it'll look like this:

    Record 1

    Record 2

    Record 3


    and not

    Record1
    Record2
    Record3

    Thanks
    I won't byte... hard!

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You would need to pull the query into a disconnected dataset, then manually iterate through each row to add your blank records.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    yes
    instead change the list box record source to value / field list
    in the forms on load event populate the list box row source with the columnns from a recordset, seperating each columnn with a semi-colon. add the same numbers of semi colons as columns from the recordset

    BUT, and its a big but, why do it?. You are creating more work for yourself, making yuou application less obvious to users used to WIMP programs

    you have to trap for null values from the list box.
    It can be doen, but I wouldn't think its a good idea unless you have a very good reason to do it.

    Just thinking out aloud I wonder what would happen if you added either vbcrlf or chr$(10) to the end of a column if that would give the same effect?

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I wouldn't imagine so. The newline char isn't quite the same as a new record.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •