Results 1 to 5 of 5
  1. #1
    54.69.6d.20 is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2012
    Posts
    21

    click check box and display value in textbox in access

    I have a form that has a remarks textbox. Depending on the options, the form will write something in that textbox. Now I want to have other options (check boxs) that I can click on which will add to that remarks textbox.



    Right now my code is not adding, it replaces. Thanks for the help.

    Code:
    Private Sub Check27_Click()
    
    
    If Me.Check27 Then
       Me.Remarks = ("Shipping Box/Container")
    Else
       Me.Remarks = ""
    End If
    
    
    
    
    End Sub

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Me.Remarks = Me.Remarks & "Shipping Box/Container"

  3. #3
    54.69.6d.20 is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2012
    Posts
    21
    Quote Originally Posted by RuralGuy View Post
    Me.Remarks = Me.Remarks & "Shipping Box/Container"
    Thanks. I noticed it was on the same line.
    How can I make it like:

    Checkbox 1
    Checkbox 2
    Checkbox 3
    Etc..

    Where it just adds to the next line. Right now it's just adding to the line.. "Stock Item #: TEST123 (456789 test equipment 101)Shipping Box/Container"
    I would like:
    Stock Item #: TEST123 (456789 test equipment 101)
    Shipping Box/Container

    Thanks again

  4. #4
    54.69.6d.20 is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2012
    Posts
    21
    I got it...

    Private Sub Check27_Click()

    If Me.Check27 Then
    Me.Remarks = Me.Remarks & vbNewLine & "Shipping Box/Container"
    Else
    Me.Remarks = ""
    End If

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You've got it!

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

Similar Threads

  1. Click on Locked Textbox
    By bginhb in forum Forms
    Replies: 2
    Last Post: 12-22-2011, 11:19 AM
  2. Replies: 3
    Last Post: 10-16-2011, 02:51 PM
  3. On click textbox inserts value back on combobox
    By whitelockben in forum Forms
    Replies: 2
    Last Post: 10-09-2011, 05:23 AM
  4. Replies: 8
    Last Post: 05-26-2011, 09:23 AM
  5. Replies: 2
    Last Post: 08-07-2010, 04:06 PM

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