Dear Sir

I am new in vb. I am facing a problem.
I create table in Access. where(ID, Name, Salary) field is there. I Make front page with VB.6 now i want to input data name, salry. ID should be generated by machine increased one by one. How i will make a code. Pls give me the solution.

Thanks Nazrul

Recommended Answers

All 3 Replies

you must set your ID to primary key,auto increment in your MS Access.The ID field will automatically increase by one everytime you add a record.

if you use integer as id datatype (ex:1.2.3...n)
you can select max from id and add it by 1.

1. either make the field as autonumnber or
2. use the technique as suggested in the previous post.

Be a part of the DaniWeb community

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