Results 1 to 4 of 4
  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Question Append Checkbox Data

    I have a text box that I want to append data into. I have nine(9) check boxes with different statements. When a check box, or any combination there of, is clicked I want the label data associated with each check box to append tot he end of the text box, or display in bulleted format (preferred). The code below is for the data to append, the problem I run in to is if multiple check boxes are selected they overright the previous checkbox.


    Code:
    Private Sub chkReason1_Click()
    If Me.chkReason1.Value = True Then
    DenLtrReason.Value = lblReason1.Caption
    End If
    End Sub
     
    Private Sub chkReason2_Click()
    If Me.chkReason2.Value = True Then
    DenLtrReason.Value = lblReason2.Caption
    End If
    End Sub

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Something along the lines of:

    DenLtrReason.Value = DenLtrReason.Value & ", " & lblReason2.Caption
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    What if I want it to return instead of a ", "? I would rather start a new line.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Use

    vbCrLf

    instead of that bit.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Checkbox
    By Patience in forum Access
    Replies: 5
    Last Post: 06-22-2010, 05:37 AM
  2. Append query won't append
    By yelkenli in forum Queries
    Replies: 5
    Last Post: 02-12-2010, 11:19 AM
  3. Checkbox
    By Rbtsmith in forum Access
    Replies: 2
    Last Post: 02-17-2009, 04:19 PM
  4. Combining textbox and checkbox data
    By jgarner in forum Access
    Replies: 0
    Last Post: 12-11-2008, 11:10 AM
  5. checkbox
    By Suresh in forum Forms
    Replies: 0
    Last Post: 12-19-2007, 01:30 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums