Results 1 to 4 of 4
  1. #1
    poleethman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Posts
    2

    Field displayed as Field Name before information is entered.


    Is there a way in Access to create a field where the label is displayed inside the field until data is entered into the field? A good example of what I'm trying to accomplish is on http://www.weebly.com. The "Full Name", "Email", and "Password" fields are labeled in grey right inside the fields, and then the labels go away as soon as the fields are populated.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    If the Textboxes are bound to fields in the forms Record Source then perhaps you could set the "Default Value" property of each textbox to the appropriate caption.
    If they are are unbound you could set the text in each with the forms On Open event.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    poleethman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Posts
    2
    I've tried adding this to the OnOpen event in the form with no Luck:

    =IIf(IsNull([SRComment]),"Comment",[SRComment])

    Where [SRComment] is the field that is blank, and "Comment" is the text that I want to appear there in its place. That's what the Microsoft website had suggested for this kind of event. I don't get any errors or results either way so it's been hard to figure out what's wrong. I'm not sure if it's a syntax error, or it's in the wrong place, or I'm going about this entirely wrong.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    Try:
    Me.SRComment="Comment"
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 8
    Last Post: 05-13-2013, 06:26 PM
  2. Replies: 10
    Last Post: 01-29-2013, 08:59 AM
  3. Replies: 1
    Last Post: 07-12-2012, 12:09 PM
  4. Field displayed as a record
    By DavidMack in forum Queries
    Replies: 6
    Last Post: 07-05-2012, 02:13 PM
  5. Replies: 12
    Last Post: 06-04-2012, 10:55 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