Results 1 to 2 of 2
  1. #1
    brownk is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    May 2012
    Location
    Evansville, IN
    Posts
    56

    Easy expression question

    Hello everyone! Im trying to get a date to field to return either the date (which i have working) or to say "Unknown". When employees enter data into a loan program they will put in a date. If no date is entered, i.e its an unknown date, the database defaults to "1/1/1900". I am trying to get it to say "Unknown" rather than "1/1/1900". This is my code so far, keep in mind it is already successfully displaying the date as i want it, but its still displaying "January" for the "1/1/1900" dates.



    Closing Date: Format([Date],"mmmm") & IIf([Date]=1/1/1900," Unknown ")

    Can anyone tell me what im doing wrong?

    Thanks

  2. #2
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    Try this: IIF([DATE]=#1/1/1900#,"Unknown",Format([Date],"mmmm"))


    Also I would consider changing the field name [Date] to something more descriptive like DueDate or OpenDate

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

Similar Threads

  1. Easy question
    By fyes in forum Programming
    Replies: 1
    Last Post: 12-20-2011, 12:08 AM
  2. Check Box easy question
    By kathi2005 in forum Forms
    Replies: 7
    Last Post: 11-03-2011, 01:58 PM
  3. Probably a very easy question
    By Ext1jdh in forum Queries
    Replies: 4
    Last Post: 08-02-2011, 12:26 PM
  4. Easy Question Need Help With
    By jdusaf in forum Access
    Replies: 1
    Last Post: 03-23-2011, 11:33 AM
  5. Easy question
    By Danzig in forum Access
    Replies: 11
    Last Post: 10-28-2010, 06:48 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