Dear All.
I have developed College management system ,and using VB6 tools as front and MS Access as database ,I want to generate autoID of students according to their technologies,for example for Electrical....... 01ELE,For Computer ....... 02Comp ,for Civil.... 03CL etc or Pls Give me suggestion t o create new tables for every technologies?

Hi Zeb,

You can not set the field in your table to auto increment, it will only accept integers type like 1,2,3,4 etc. The way around this is to do the following -

''Open your recordset.... SELECT * FROM etc...

Dim xCount As Integer, strRec As String

xCount = rsRecordset.Recordcount
xCount = xCount + 1

strRec = xCount & "ELE"

Now, when you add a new record to your database, use strRec as the field id.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.