Results 1 to 10 of 10
  1. #1
    Stam is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2022
    Location
    Athens, Greece
    Posts
    6

    Question Mark required fields with a red asterisk

    Hello everyone,

    I've just registered in this forum and I'd like your support with the following issue.

    I've undertaken a rather simple task to build a database app for managing projects.
    Some of the table fields have already been marked as required through the fields' properties.
    But is there a way to add a red asterisk next to the label of each of these fields in a form?

    It's a kinda nice to have feature, instead of having a message showing up.

    Many thanks!

    /Stam

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Could use another label with asterisk character and red forecolor.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    You could just set the label font to red?
    Else I would have thought you would need another label to hold the asterisk so as to be able to have a different colour.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    Stam is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2022
    Location
    Athens, Greece
    Posts
    6
    That's what I was thinking as well. Just add a label next to it. But was wondering whether there was a more fancy way to do it, maybe through VBA.
    In any case, that will work for sure.

    Thank you both for replying!

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You could also look at Conditional Formatting on the ribbon to add a yellow back color (or whatever) to required controls that aren't completed yet.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    I do exactly what @June7 suggested and bold / colour red the main label caption text for required fields
    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

  7. #7
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    you can use the format property to show a message if the field is null

    for text it would be

    @;[Red]"Required field"

    for numbers

    #;#;#;[Red]"Required field"

    replace # with whatever number format you require

  8. #8
    Stam is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2022
    Location
    Athens, Greece
    Posts
    6
    Many thanks for your answers everyone!
    I guess I'll be moving with the extra label as it seems straightforward for the user.

  9. #9
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    I would expect it depends on how much real estate you have on the form?, else the other options would be better, in my view.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  10. #10
    Stam is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2022
    Location
    Athens, Greece
    Posts
    6
    Quote Originally Posted by Welshgasman View Post
    I would expect it depends on how much real estate you have on the form?, else the other options would be better, in my view.
    Frankly, there is plenty of info and at the moment I get 10 forms.
    Also, a deadline which is soon approaching!

    But I might also need some help while building the reports.

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

Similar Threads

  1. Vba to Check for required fields
    By ezybusy in forum Forms
    Replies: 8
    Last Post: 06-23-2017, 07:50 PM
  2. Required fields in subform
    By Ray67 in forum Forms
    Replies: 3
    Last Post: 12-13-2012, 06:35 AM
  3. Conditionally Required Fields
    By HawkGuru in forum Programming
    Replies: 6
    Last Post: 10-03-2011, 05:47 AM
  4. Required Fields
    By scubagal in forum Forms
    Replies: 9
    Last Post: 09-29-2011, 07:26 AM
  5. Required Fields in a Form
    By Alaska1 in forum Access
    Replies: 3
    Last Post: 12-23-2010, 01:41 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