Results 1 to 6 of 6
  1. #1
    sylviar is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    7

    How to Create a Autonumber with dashes

    Hi I need to create a Autonumber field in a table with the following starting value 13-642-2000.




    Please advice

  2. #2
    Beetle is offline Unrelatable
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    Camp Swampy (Denver, CO)
    Posts
    207
    OK, so what are the rules for how this value is supposed to increment? There are a multitude of possibilities with a value like that.

  3. #3
    sylviar is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    7
    Morning,
    Its supposed to increment by one...13-642-2000, 13-642-2001 ans so on

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    It appears that you have embedded significance in the code. How do you interpret/decipher the code?
    Suggest you use atomic fields/values and concatenate for display if that's important to you.

  5. #5
    sylviar is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    7
    Quote Originally Posted by orange View Post
    It appears that you have embedded significance in the code. How do you interpret/decipher the code?
    Suggest you use atomic fields/values and concatenate for display if that's important to you.

    13= to fiscal year
    642= Division number
    2000= purchase number

    How do I concentrate on increasing the purchase number

  6. #6
    Beetle is offline Unrelatable
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    Camp Swampy (Denver, CO)
    Posts
    207
    As Orange mentioned, these values should be stored in separate fields and concatenated for display where necessary. As far as incrementing the Purchase Number, that would be done in the Before Update event of your form. Example;

    If Me.NewRecord Then Me!PurchaseNumber = DMax("PurchaseNumber", "YourTable")+1

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

Similar Threads

  1. Replies: 0
    Last Post: 09-17-2012, 03:35 PM
  2. Replies: 6
    Last Post: 04-27-2012, 05:14 PM
  3. Replies: 7
    Last Post: 04-17-2012, 08:17 AM
  4. Replies: 30
    Last Post: 01-16-2012, 05:49 PM
  5. CREATE TABLE and AutoNumber fields
    By JTeagle in forum Queries
    Replies: 1
    Last Post: 11-10-2011, 03:31 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