Results 1 to 6 of 6
  1. #1
    cnstarz is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    31

    click label -> append text to texbox


    I have a label and a textbox. i would like to be able to click the label and append specific text to the textbox. so, if there is text already there, i would like it to add the text to the end of the textbox instead of replacing the entire content of the text box.

    i know how to make it insert text into the box, but not without replacing the entire content of the box.

    any ideas? thanks!

  2. #2
    apr pillai's Avatar
    apr pillai is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Alappuzha, India
    Posts
    209

    click label -> append text to texbox

    Text Source from where, another textbox?

    If from another textbox then try the following example as a guide:

    Code:
    Private Sub Label21_Click()
    Dim t
    
    t = Nz(Me![Text19], "") ' Target textbox
    t = t & " " & Me![LastName] ' Source Textbox
    
    Me![Text19] = t
    
    End Sub

  3. #3
    cnstarz is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    31
    Ah, should've been more specific. I want the text to be the same text as the label that's being clicked. If the label says, "Meow", then i would like "Meow" to be appended to the end of the textbox.

  4. #4
    nicknameoscar is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Apr 2011
    Location
    Earlysville, VA
    Posts
    91
    Me.Textbox = Me.Textbox.text & Me.Textbox_Label.Caption

    or it could be:

    Me.Textbox = Me.Textbox & Me.Textbox_Label.Caption

    or it could be:

    Me.Textbox = Me.Textbox.Value & Me.Textbox_Label.Caption

    or you may have to use:

    Me.Textbox.Text = (one of the above)

  5. #5
    cnstarz is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    31
    Quote Originally Posted by nicknameoscar View Post
    Me.Textbox = Me.Textbox & Me.Textbox_Label.Caption
    it be this one. thanks!

  6. #6
    nicknameoscar is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Apr 2011
    Location
    Earlysville, VA
    Posts
    91
    Glad to help. Sorry for the multiple choice. Without knowing specifics of how you are doing things I wanted to cover all the bases .

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

Similar Threads

  1. Make text click-able
    By Fifa in forum Access
    Replies: 5
    Last Post: 03-27-2011, 06:44 PM
  2. Label Help
    By rcotero in forum Access
    Replies: 2
    Last Post: 11-05-2010, 01:39 PM
  3. Replies: 1
    Last Post: 04-29-2010, 05:15 PM
  4. Append query won't append
    By yelkenli in forum Queries
    Replies: 5
    Last Post: 02-12-2010, 11:19 AM
  5. Replies: 1
    Last Post: 03-29-2009, 08:27 AM

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