klemster Get busy livin' Parked in the garage Joined Aug 3, 2006 Messages 1,784 Points 313 Location Co. Cork Mar 19, 2008 #1 a part of a project I have to do is to be able to save delivery information to a random access database. Each delivery needs to have a unique order number. Does anyone know away of generating a unique order number for each delivery??
a part of a project I have to do is to be able to save delivery information to a random access database. Each delivery needs to have a unique order number. Does anyone know away of generating a unique order number for each delivery??
X Xen Patron member Parked in the garage Written 5 guides Joined Feb 15, 2007 Messages 2,197 Points 548 Location West Yorkshire Mar 19, 2008 #2 cant you just enumerate all entries in the database for numbers on load into a string so it would come out "152,3245,542,345,64,452..." then use something along the lines of Code: Dim i as Integer Do If Instr(1, DatabaseNumbers, cStr(i)) <> 0 then DatabaseNumbers = DatabaseNumber & cStr(i) & "," Exit Do Else i = i +1 End If Loop Then use i as the entry number. The whole process would take seconds even for a large database. Last edited: Mar 19, 2008
cant you just enumerate all entries in the database for numbers on load into a string so it would come out "152,3245,542,345,64,452..." then use something along the lines of Code: Dim i as Integer Do If Instr(1, DatabaseNumbers, cStr(i)) <> 0 then DatabaseNumbers = DatabaseNumber & cStr(i) & "," Exit Do Else i = i +1 End If Loop Then use i as the entry number. The whole process would take seconds even for a large database.