Results 1 to 8 of 8
  1. #1
    Darkatoms is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2015
    Posts
    4

    Generat a coutom Data Type for PO

    Hi. I'm a noob so take it easy on me.




    I have been given the task to create a purchase order DB. The issue I have is generating the PO Number.

    What they want is the Year (to auto update when it changes) - Department - Number (Auto Generate) Example 2015-IT-0502



    I have tried a few thing but can not work it out. Looked through many forums and not working in DBs I am struggling and don't really know what to look for.

    Any help wood be appreciated

  2. #2
    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,870
    What exactly is a purchase order database?

    Does it deal with Customers?, Suppliers?, Purchases? Products? Services?
    Does it involve Stock Control, Inventory Management, ReOrder Points?,ReOrder Quantity, Product Substitutions?

    If any of these is relevant, you might want to watch this 26 minute youtube video.

    It should help you to get your materials and priorities together based on a real application.

    Good luck with your project.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I would probably create a separate column for each part. One column for the year, one for the department or ?, and one for the number.

    Maybe use a separate table dedicated to storing the PO that is intended for human consumption. So, Primary Key column and three other columns.

  4. #4
    Darkatoms is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2015
    Posts
    4
    The purchase order database is for tracking orders and creating the PO. The only thing I an stuck on is creating the PO Number; Year (to auto update when it changes) - Department - Number (Auto Generate) Example 2015-IT-0502

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    What you are looking for is "Custom Autonumbers". There are scads of articles on how to do this.

    Here is one method: http://baldyweb.com/CustomAutonumber.htm

    2 example dBs here: http://www.utteraccess.com/forum/Cus...-t1953743.html

  6. #6
    Darkatoms is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2015
    Posts
    4
    Sweet. Thanks. I will have a go and see what happens

  7. #7
    Darkatoms is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2015
    Posts
    4
    I have entered in the Default Value =Year(Date()) & "-IT-" & [ID] . Only thing that is not working is grabbing the number from the ID field.

    The error is "The database engine does not recognize either the field 'ID' in a validation expression, or the default value in the table 'PO Reg'

  8. #8
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    My comments:

    ** "ID" is a poor field name.

    ** I would NOT use the Default property - I would use the Form Before Update event to generate the "PO Number".

    ** Depending on what method you are using (one field or 3 fields for the PO Number) to increment the "ID" number, you might have to use a UDF or DLookup() to get the current number and increment it.


    And what do you want to happen when the year changes? Start at 1 again or continue incrementing the number?

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

Similar Threads

  1. Replies: 10
    Last Post: 11-02-2015, 11:11 PM
  2. Data Type
    By MTSPEER in forum Queries
    Replies: 11
    Last Post: 05-21-2015, 06:58 AM
  3. Data Type to input data number
    By TioAdjie in forum Access
    Replies: 5
    Last Post: 02-17-2014, 11:21 AM
  4. Replies: 3
    Last Post: 05-31-2013, 04:32 PM
  5. Replies: 2
    Last Post: 03-18-2010, 08:24 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