hi can you help me about puting a unique record in a field. Like the student #, it must only be inputed once, and when it is input again a message box will appear sayin "message box already exist"? can you give me the code pls.?
1st is to open the database with access and make a primary key for the field you want and it will never store a record twice .. but you have to write on your code that "
"""""---------------------CODE------------------" On Error Resume Next If Adodc1.Recordset.RecordCount = 0 Then Adodc1.Recordset.AddNew Adodc1.Recordset.Fields!Name = txtname.Text Adodc1.Recordset.Update Else Dim Count As Integer For Count = 0 To Adodc1.Recordset.RecordCount If Adodc1.Recordset.Fields!Name = txtname.Text Then If MsgBox("This value is exists . do you want to remove it and add the new?",
vbOKCancel) = vbOK Then Adodc1.Recordset.AddNew Adodc1.Recordset.Fields!Name = txtname.Text Adodc1.Recordset.Update Exit For End If Else Adodc1.Recordset.MoveNext End If Next End If """"
tnx man it was very helpful..^__^
PipingUnat 1 day ago
Thnq..:)
praxalshah 4 days ago
mohammed the cyberterrorist Thumbs up xD
Mikail601 1 week ago
thanks sr...help me for the datagrid connection with database...
cpj28jan 1 month ago
Hey there, thanks alot :D Now, is there any way to add an image to a field?
PleaseNotAgain1 3 months ago
This has been flagged as spam show
Thank you....!
Isu4388 4 months ago
HEY MAN YOU ARE MY ROLL MODEL THIS IS WHAT I AM SEARCHING THANKS A LOT MAN...................
sathishc89 4 months ago
AMAZING!!!!!!!!!!!!
markili14 5 months ago
good video!!
qasimesmail9 5 months ago
Thanks a lot dude :) helped me on my report :)
iceleon25 5 months ago
I don't see haters! Good video!
XsNiPeRxXz 6 months ago
instead of I'm gonna
raiheart23 6 months ago
I'm gonna to!!!
raiheart23 6 months ago
this is helpful ,,thanks to you sir!!
yatz14ify 7 months ago
Thanks bro, maybe this will help me to pass exam at uni hihi ^_^
cybertrancer 8 months ago
@cybertrancer im glad to hear that :)
msrs0ft 8 months ago
@cybertrancer Lol, I am like pro coder, I can do databases and others and ur in university and you can't lool
ThePassel 6 months ago
@ThePassel Quiet noob
cybertrancer 6 months ago
Look msrs0ft I didn’t find words for thanking you. This 15 min saved my soul.
My company attended to fire me because something related to this subject , I wish I can describe my happiness now. Really THANK YOU
1mechatronics 9 months ago
@1mechatronics my pleasure Sir
msrs0ft 8 months ago
@1mechatronics dont say any ,,, its ok
u r welcome
and its pleasure to help
msrs0ft 8 months ago
@msrs0ft dude how do you create the same database in VB 2008. because 2008 has not got add on option
ramiz1116 5 months ago
HELL YEAH THX SO MUCH!!!!!!!!! this is GREAT thing for my movie that im planing to do with my friends!!!!!! thx so MUCH!!!
SeRgA123456789 9 months ago
thank you from Peruuuuuuuuuuuu ooh!! XD
VenturaPaul 10 months ago 2
@VenturaPaul u r so welcome from egypt ; and i thinkthat im going to earn a new friend from peru :D
msrs0ft 10 months ago 2
Goood work my friend
zubair4685 10 months ago
@zubair4685 thnx alot , just hope to help
msrs0ft 10 months ago
hi can you help me about puting a unique record in a field. Like the student #, it must only be inputed once, and when it is input again a message box will appear sayin "message box already exist"? can you give me the code pls.?
starcatcher164 1 year ago
1st is to open the database with access and make a primary key for the field you want and it will never store a record twice .. but you have to write on your code that "
on error resume next"
as an error handler
other way :-
msrs0ft 1 year ago
msrs0ft 1 year ago
msrs0ft 1 year ago
@msrs0ft thanks
starcatcher164 1 year ago
@starcatcher164
With pleasure ....
msrs0ft 1 year ago
@starcatcher164
You are welcome :)
msrs0ft 1 year ago