Results 1 to 4 of 4
  1. #1
    usmcgrunt's Avatar
    usmcgrunt is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2010
    Location
    Just outside the gates of freedom
    Posts
    71

    How to put a prompt message inside a text box

    I am trying to add a instructional message inside a text box like you see in Outlook and explorer help boxes. I have included pictures below of what I am trying to do. Essentially, I want a short statement describing what goes in the text box and once the user clicks in the box, the text disappears. Right now I am using the default value function.

    Thanks for the help.



    Sean

  2. #2
    michaeljohnh is offline More Human than Human
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    61
    <Post deleted by poster>

  3. #3
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    HI,

    create a dialogue form. Start with a blank form in design view and then set it's properties so it becomes a dialog form: border style = dialog, no scroll-bars, no navigation buttons, no record selector, pop-up = true , modal = true (carefull here, be sure you have a close button before doing this). Place the controls you need (text boxes, labels, command buttons, ...) on the form. And write in the event procedure of the command button that closes the code that performs the actions you want to happen after the user has done his thing.

    gr
    NG

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    here is a sample event for textbox. be sure the textbox is not in focus when the form open. then, with it gets focus, the text go away.

    Code:
    Private Sub Text0_GotFocus()
        If """" & ActiveControl & """" = ActiveControl.DefaultValue Then ActiveControl = ""
    End Sub

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

Similar Threads

  1. How to vertically align text inside a text box ?
    By alexcalgary in forum Forms
    Replies: 2
    Last Post: 10-06-2010, 08:44 AM
  2. Replies: 5
    Last Post: 03-04-2010, 05:41 AM
  3. the message #Name? in the text
    By grad2009 in forum Forms
    Replies: 7
    Last Post: 02-22-2010, 05:41 PM
  4. Rounded number inside of text
    By Lockrin in forum Access
    Replies: 6
    Last Post: 01-27-2010, 12:26 PM
  5. Text too long, error message
    By taylormotm in forum Access
    Replies: 13
    Last Post: 06-18-2009, 07:24 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