Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    42

    Question Unanswered: Alternate to autonumber

    I had seen a prior post about some alternatives to an autonumber field. Since search is not working can someone help?
    Thanks

  2. #2
    Join Date
    Mar 2003
    Location
    UK
    Posts
    71
    i found that holding a table with a key in it and using that nuber to populate the key field of the new record works well. when you have added the new record you can then increment the record in the table however you want.

    eg. in my table my key needs to be a comination of a letter then 5 numbers then a letter - X12345b
    i have a function that will increment it to x12345c when x12345b is used. the function just needs to follow you rules, so in my case when i reach x12345z i go to x12346a.

    hopr this helps

  3. #3
    Join Date
    Mar 2004
    Posts
    38

    Exclamation Pay Attention

    Quote Originally Posted by emma_com
    i found that holding a table with a key in it and using that nuber to populate the key field of the new record works well. when you have added the new record you can then increment the record in the table however you want.

    eg. in my table my key needs to be a comination of a letter then 5 numbers then a letter - X12345b
    i have a function that will increment it to x12345c when x12345b is used. the function just needs to follow you rules, so in my case when i reach x12345z i go to x12346a.

    hopr this helps
    The following method will work only for a single usr enviroment. In a multy-user enviroment you cant calculate the key value by code, because of the hazrd of duplicating a key that another user has just caculated also.
    You might be able to work around this using the Form_BeforeUpdate event, but I still feel that its a dangerous method.

    {dd+}

Posting Permissions

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