Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    autonumber for conversion (2000 SR-1)

    I am converting 15,000 records for employees assigned to depts. I need to provide a number for each employee in a dept. (ie: renumber at each dept change). Employees can be in more than one dept, but that is not this question! This is not a relational database question.

    Example: Dept Employee# ID
    HR 1111 HR1
    HR 2222 HR2
    ACCT 3333 AC1
    ACCT 4444 AC2

    After the conversion, the user will manually maintain; the ID's will be reassinged to new employees per dept.

    Thanks!
    Amy

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: autonumber for conversion (2000 SR-1)

    According that the table is named Table1 and that the employee number is unique and is a numeric value, use this formula in an update query for an new ID field:

    <pre>[dept] & DCount("dept","Table1","Employee<= " & [Employee] & " and dept <= '" & [dept] & "'")</pre>


    If your field name contain a #, remove it.
    Francois

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: autonumber for conversion (2000 SR-1)

    Sorry, I forget to shorten the dept.
    <pre>Left([dept],2) & DCount("dept","Table1","Employee<= " & [Employee] & " and dept <= '" & [dept] & "'")</pre>

    Francois

  4. #4
    New Lounger
    Join Date
    Jan 2001
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: autonumber for conversion (2000 SR-1)

    Thanks for your help, but I can't get it to work. There is some sort of syntax error around the "Employee&l1;= ...and the end . I cannot find it after trying everthing I can think of. Can someone test this and see where I've gone wrong. Also, what does the "<" meant. Is that "l" as in "L" or is it supposed to be a 1?

    I appreciate any help. Thanks in advance.

  5. #5
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: autonumber for conversion (2000 SR-1)

    <hr>There is some sort of syntax error around the "Employee&l1;= <hr>
    I don't see where you get the &|1;.
    the right syntax is
    <pre>"Employee<= ...</pre>

    Employee then the less than sign and the the equal sign
    Francois

Posting Permissions

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