Results 1 to 9 of 9
  1. #1
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    754

    Name in a txt, cbo, and so on on a form?


    Hi all,
    I seen a post a while back on facebook group but to save my life i cant find it now. In any event, does anyone know how to put a name that stays in text or combo boxes in access? I attached a photo of what i am talking about. As in photo, the User ID is small and stays put. Would love to do this on some of my forms

    Thanks
    .Click image for larger version. 

Name:	textbox.jpg 
Views:	31 
Size:	6.4 KB 
ID:	42961

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I can only surmise that you are referring to the Default Value property of a control but I'm not sure what this means:
    put a name that stays in text or combo boxes
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    Do you mean like an indication of the currently logged in user?

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Use a public variable or a tempvar to save the value from one location and then use it again throughout your application
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    754
    Thanks all,
    I wass just trying to put the label in the txtbox and such. I figured out a way to get around it and just put the label behind it and make things transparent. I dont think you can do what i was actually looking for in access.
    Thank you all,
    Dave

  6. #6
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    Ah, I think your talking about formatting a textbox.
    In the format property you put
    Click image for larger version. 

Name:	format.png 
Views:	16 
Size:	3.8 KB 
ID:	42972

    and you get
    Click image for larger version. 

Name:	tst.png 
Views:	17 
Size:	1.3 KB 
ID:	42973

    the text will disappear when you enter the textbox.
    You can also add color if you want.



    I believe Colin has some info about this on his website although I couldn't find it. I'm sure he'll be back.

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Sorry but I thought I understood until the OPs last reply... But now I'm confused again.
    If I have something on my website as Moke suggests, I'll happily forward a link,when I know what this is about.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #8
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    I think what he's talking about is having default text in a textbox , such as "Required" which as you know can be achieved by putting @;"Required" in the format property of the textbox.
    You can color it by putting @;[Red]"Required"

    OP's work around is using a label behind a transparent textbox, I think?

    I thought you had something about this on your site but I could be confusing it with your add color to queries thread. My bad.

  9. #9
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    If that is what the OP means, the formatting approach will work perfectly. That link explains the idea so 'you're good'!
    http://www.mendipdatasystems.co.uk/a...our/4594424152
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

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