0

Well i'm trying to create a form in VB6 to control my database that was created by access, i did everything and everything went perfect,until i notice that if you enter the same "ID" i get an erreur from access that there is multiple Ids with the same number,since i activated the primary key in access so it doesn't allow that,so what i'm trying to do is when the user move from the Id cell to other cell,visual basic scan the id cell first and check if there is no other id with the same number,if it is i need visual basic to prompt me with msgbox that say's there is multiple id with the same number. i hope that you understand what i'm trying to say i need a way to do it,just the way to follow.thanks
* image : http://i.stack.imgur.com/oqBpI.png

4
Contributors
3
Replies
16
Views
2 Years
Discussion Span
Last Post by matoo
0

Please show your codes first. Here are many exparts, who can give you correct way to solve your problems.

0

If i understand you, what you need is for the program to give the next open id number, you put auto increment in the id details in the database, open a new record, and ask the database what was the id it created. This is the id you use for the updating of the rest of the data. The id textbox should not be enabled.

0

you can write a code in the lostfocus of that textbox to search that number which you entered in the database if found it give you message box telling you that the number or ID already exist and the textbox.setfocus to take you back to the same box.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.