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

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

Options
  • 03-08-2017 9:30am
    #1
    Registered Users 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 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