Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

[ACCESS][SOLVED] Date format, N/A for Null or blank for hand written date?

  • 03-08-2017 8:30am
    #1
    Registered Users, Registered Users 2 Posts: 1,931 ✭✭✭


    I'm looking for solution that allows to have a field in report to show:
    1. Normal date, format dd-mmm-yyyy (DONE)
    2. N/A when the date is Null (DONE with dd-mmm-yyyy;;;"N/A"
    3. Now the tricky part: I want to be able to leave the field blank for hand written date.

    Any simple ideas about how to do it? I'm going to play with an additional field DATE_VISIBLE that would control visibility of the date field, but it feels like a hack - is there a better method?


Comments

  • Registered Users, Registered Users 2 Posts: 1,931 ✭✭✭PrzemoF


    Additional field DATE_VISIBLE and Iif([DATE_VISIBLE], my-date-field-here, "") in SQL quary allows to handle all 3 cases.


    Edit: It's half-solved; using IIf breaks date formatting :-/

    Finally solved with ugly nested iif:
    CLIENT_DATE: Format(IIf([DATE_VISIBLE],IIf([CLIENT_APPROVAL_DATE],[CLIENT_APPROVAL_DATE],"N/A")),"dd-mmm-yyyy")
    


Advertisement