Hi everybody!
Here i am again asking for help from you guys!
My question is this: How do i generate autonumber in VB? Please help me...I need an answer as soon as possible. Thanks..
:confused:
Printable View
Hi everybody!
Here i am again asking for help from you guys!
My question is this: How do i generate autonumber in VB? Please help me...I need an answer as soon as possible. Thanks..
:confused:
AutoNumber for what exactly??
:confused:
The only Autonumber i know of deals with a type of field in Access databases. And this simply is: add 1 to last record's ID value
If you have a set of numbers, all you need to do is loop through the numbers and add one to the highest number in the set.
VB Code:
' Declarations lngArr() as long Private Function GetNextID as Long dim i as long dim iHigh as long For i = lbound(lngArr) to Ubound(lngArr) if lngArr(i) > iHigh then iHigh = lngArr(i) Next i GetNextId = iHigh +1 End Function