Unique Value creation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ramdil
    New Member
    • Dec 2007
    • 46

    Unique Value creation

    Hi All
    I have customer customer form which was already build 5 years ago.It has custID, custname and other cust details fileds in database.Initia lly CustId also was filled by users.Now they want that field to be autogenerated,S ince it is not a autonumber, i have written a code in the change event of custname.Logic was taking first five letter of entered customer name and then append a variable whose initial value will be 1 which will be incremented on each entry.My doubt is that the variable used to append is declared as long.So if it crosses its limit of size then it will create a problem.So can any one suggest me how to over come this situation or have any other better idea .Thanks in advance
  • Scott Price
    Recognized Expert Top Contributor
    • Jul 2007
    • 1384

    #2
    I seriously doubt you will have a problem with this before you retire :-) Long Integer values have a maximum of over 2 billion, 147 million records. If the table approaches that many records, you'll likely have run into other size restrictions long before, such as the 2 gigabyte limit on Access databases.

    Regards,
    Scott

    Comment

    • ramdil
      New Member
      • Dec 2007
      • 46

      #3
      Thanks for that



      QUOTE=Scott Price]I seriously doubt you will have a problem with this before you retire :-) Long Integer values have a maximum of over 2 billion, 147 million records. If the table approaches that many records, you'll likely have run into other size restrictions long before, such as the 2 gigabyte limit on Access databases.

      Regards,
      Scott[/QUOTE]

      Comment

      Working...