Results 1 to 2 of 2

Thread: Create a autonumber field - HELP!!!!!

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    South-Africa
    Posts
    46

    Post

    I am busy working with a program but i have a problem.
    I am working with job numbers and each job number is for a specific place.
    81101254 - Component Shop
    84101234 - Workshop (new job number here!)
    81601222 - Service Dept.

    NOTE that the first 3 figures differ for each department.
    What must i do to create the next job number for the workshop etc. 84101235

    Say I want to click on an option button and then my program must see i want to create a new job number for the work shop.

    It must then update the appropiate field in the database(access)and diplay the newest job number to me in vb - odbc connectivity is used with vb6.

    Any help will be appreciated.

  2. #2
    Guest

    Post

    If you split the variable into two parts, i.e. xxx as office code, and yyyyy as job number. Then you could just find the largest job number in a specific office code, increment by 1 and display them together:

    yyyyy = yyyyy + 1
    test1.text = xxx + yyyyy

    This may be easier with some restructuring of your DB.

    ------------------
    Boothman
    There is a war out there and it is about who controls the information, it's all about the information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width