Results 1 to 2 of 2
  1. #1
    Sturgis76 is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    4

    Adding a letter after a date

    Hoping someone can give me some help. I have a form for purchase orders. The way the company has created work orders in the past is by date, a letter to show if it was the first, second, or third, order of the day and then some other numbers referring to the application of the item ordered. So the first order on 4/12/17 would be 041717A, second order would be 041717B. The part I'm trying to figure out is how to have the letter auto populate after the date. I'm not even sure if this is possible. I got the box to auto fill the date by using the Expression builder with =Format(Date(),"mmddyy") under the default value for the text box. Thanks for your help.

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    google 'dmax+1' which is the way you need to do it but your code does not fit the profile so you need to rethink

    dmax will give you the largest number - but with your date format, 9/10/17 gives you 091017 - which is larger than 041217 - you need the numbers the other way yymmdd - which would give you 171009 and 171204

    you are then appending a letter - so what happens after you've done 26 orders?

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

Similar Threads

  1. Replies: 7
    Last Post: 10-19-2016, 11:11 AM
  2. Replies: 1
    Last Post: 02-21-2014, 05:03 PM
  3. Replies: 4
    Last Post: 09-18-2012, 05:07 AM
  4. Formatting "Now" date as a Letter
    By swingdummy in forum Programming
    Replies: 2
    Last Post: 04-18-2012, 11:32 PM
  5. Adding a Manual Date
    By JimmyT in forum Database Design
    Replies: 1
    Last Post: 04-21-2009, 06:12 AM

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