ITs a simple textbox

ITs works as a ID no in a program. So a person cannot have similar id no..so how to do that..anyone>>>

If user enters the same number then display error message " you entered the same number" --when the user clicks the cmd.submit button.....

hi sudeep123, if you're working for a database.. you need to compare it to your recent data...

just checked id entered with id on database.
If same then display error message, if not same then add into database.

ITs a simple textbox

ITs works as a ID no in a program. So a person cannot have similar id no..so how to do that..anyone>>>

If user enters the same number then display error message " you entered the same number" --when the user clicks the cmd.submit button.....

THIS IS FOR VB 6.0

just checked id entered with id on database.
If same then display error message, if not same then add into database.

This is what I would recommend also.
You could perhaps have a method which adds the user to the database, and another method which updates the user if they already exist.
Then, you could check if they exist and if they do, run the update method. If they don't exist, run the add method.