Results 1 to 2 of 2
  1. #1
    jfn15 is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    26

    Sequential number problem

    I am trying to construct a database that will track permits. There are 5 different permit types, and each one is represented by a 'permit number' that combines a text code (an abbreviated code the the permit type) and a number. I want the number to be sequential, so that Permit type A will be, for example AA1, AA2 etc. Similarly the other permits need to have the code followed by sequential numbers that apply just to that permit type - so I need to avoid sequentially numbering without differentiating between permit types. Therefore it will be possible for two permit to have the number (for example) 33, but only if they are different permit types, eg. AA33 or AB33. The permit types are in one table that has an ID, a text description of the type, and a PermitCode field. I imagine I'll need a separate table to store the sequential numbers, with a field for each permit type within. Each permit will also need to be linked to an application - the actual applications are in another separate table, with each having a unique identifier. Applicants contact details are also in a table separately, as one person may have more than one application or permit at any one time. Tables are tblApp, tblClient, tblPermit, tblPermitType - I assume I'll also need an ancillary table, perhaps tblNumber? As I've never written code, I'm unsure how to approach this problem. What I need is a way to generate a permit number that combine the permit code with the next number assigned to that code. I further need to trigger this event, by the user changing the application from 'pending' to 'approved' (the status on the form will be a combo box linked to another table that stores the status types (tblStatus) - pending, approved, cancelled, not approved. Can anyone offer advice?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    This link should be helpful: http://www.baldyweb.com/CustomAutonumber.htm

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

Similar Threads

  1. Replies: 18
    Last Post: 05-15-2012, 03:44 PM
  2. Sequential number on subform
    By jpkeller55 in forum Access
    Replies: 8
    Last Post: 03-17-2011, 09:54 AM
  3. Adding record with next sequential number
    By stanley721 in forum Forms
    Replies: 3
    Last Post: 02-28-2011, 01:26 PM
  4. Assign A Sequential Number To A Table Row
    By KramerJ in forum Programming
    Replies: 11
    Last Post: 04-08-2009, 08:48 AM
  5. Replies: 1
    Last Post: 01-31-2009, 10:43 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