Results 1 to 3 of 3
  1. #1
    nishant.dhruve is offline Advanced Beginner
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    34

    Calendat year autonumber generation in table

    Hi is it possible to generate autonumber in calendar year form in Table
    for example i want number to be generated something like this based on year

    EU17/0000
    EU17/0001
    EU17/0002

    and when year changes it should change automatic to

    EU18/0000
    EU18/0001
    EU18/0002

    if anyone can help me out on it i would greatly appreciate your efforts on helping me.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    building your own 'autonum' like this will require vb and how to use it.
    In a form where you add a record you would need a button to create it (by running the code)
    in the example the button btnMakeID will put the new id into a text box, txtID:

    Code:
    sub btnMakeID_click()
    vID =nz( DMax("[ID]","table")) + 1
    txtID = "EU" & right(date,2) & "/" & format(vID,"0000")
    
    end sub

  3. #3
    nishant.dhruve is offline Advanced Beginner
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    34
    Hi i have attached a table snapshot. i would like to add a number to this table automated. Can u help on that with the format aboveClick image for larger version. 

Name:	MS access.JPG 
Views:	16 
Size:	29.8 KB 
ID:	27816

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

Similar Threads

  1. Replies: 19
    Last Post: 01-24-2016, 07:48 PM
  2. Replies: 4
    Last Post: 06-30-2013, 11:20 AM
  3. Replies: 4
    Last Post: 11-15-2012, 09:33 AM
  4. Automatic generation of tax year
    By Redhillgeneral in forum Database Design
    Replies: 6
    Last Post: 11-01-2012, 11:30 AM
  5. Replies: 1
    Last Post: 08-02-2011, 06:46 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