hello please help me on this i don't know how to trap the duplicate id_no..example if i have already added this id_no H-1010..then if i input again it should prompt that id_no is already exist on your database..please help me on this..hoping for your positive responds ..thanks in advance
jemz
-1
Master Poster
Recommended Answers
Jump to PostWhat exactly you want?
1. You want user don't be able to input a existing number again?
2. You want to show a message that says ID already exists?
3. You want the user can put many ID same as existing?...
First case, you'll need to make …
Jump to Postsidnei, good post but if you reread jemz post you will see that they are entering H-1010 for the primary key, meaning that the primary key is a text field. So jemz I would suggest that you use sidnei's 1st suggestion...
strSQL = "SELECT COUNT(fieldname) AS THECOUNT …
Jump to PostYou can try this.
Jump to Postif you have no question about this topic then please mark it solve.
All 15 Replies
sidnei
12
Junior Poster in Training
vb5prgrmr
143
Posting Virtuoso
abu taher
4
Practically a Posting Shark
jemz
-1
Master Poster
abu taher
4
Practically a Posting Shark
jemz
-1
Master Poster
jemz
-1
Master Poster
kinwang2009
7
Posting Whiz in Training
sidnei
12
Junior Poster in Training
sidnei
12
Junior Poster in Training
vb5prgrmr
143
Posting Virtuoso
phpbeginners
1
Posting Whiz in Training
jemz
-1
Master Poster
zigpy_siva
0
Newbie Poster
jemz
-1
Master Poster
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.