Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Jun 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add New Line (Offics Xp)

    As I select from the list box I want it to update the textbox but with a new line for each selection.
    Also I can't get my table field to show the selection as new lines. The selections stay together and when I run my history form I have to space them manully.

  2. #2
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add New Line (Offics Xp)

    When you say you want your "table field" to show the selection as new lines, do you mean you want to add new records? Or do you want to just have each selection show on a separate line within the field on your table?
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

  3. #3
    New Lounger
    Join Date
    Jun 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add New Line (Offics Xp)

    I want each selection to show on a separate line within the field on the table. This way the items would be easier to view.

  4. #4
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add New Line (Offics Xp)

    On event List132_Click, replace

    Me!Text104 & " " & Me!Text140

    with

    Me!Text104 & vbCrLf & Me!Text140

    You should look into naming conventions (giving your objects/controls meaningful names), it makes describing problems with specific objects/controls much easier. You can find examples here.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Add New Line (Offics Xp)

    You should not HAVE multiple items in a single field in a table. That is not relational design and would keep you from making use of the best features of Access. If you mean you want to use a drop down to display possible selections for a field, please clarify.
    Charlotte

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add New Line (Offics Xp)

    As Charlotte notes, you shouldn't store multiple values in a single field. You have a many-to-many relationship between WeekDayShift and Options: several options can correspond to one weekdayshift, and several weekdayshifts can correspond to one option. The standard way to implement such a relationship is through an intermediate table joined to both WeekDayShift and Options, and a subform bound to this intermediate table on the main form.

    See the attached rough example.

Posting Permissions

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