How to create ,Save,Update ,Delete and Search Student Profile information using Visual basic and Ms Access-Step By Step
VB6 Control used are Textbox, OptionBox,Combobox,Picturebox,DatePicker ,Common Dialog controls
Features of Application are:
1.How to design the VB form and add various controls i.e Textbox, OptionBox,Combobox,Picturebox,DatePicker ,Common Dialog controls onto the form.
2.How to create database object at run time and do the database connectivity.
3.How to load the image onto the form using commondialog control and also Save /Retrieve the Image or Picture from the database.
4.How to save the values selected from Optionbox and Combobox into the database and retrieve them when required.
5.How to Use datepicker control and Save the Date into the Database.
6.How to Save ,Delete,Update and Search the Student profiles.
7.How to navigate between the profiles (First/Next/Previous/Last).
if you like my work,Please hit like button and SUBSCRIBE to my channel.
CODE FOR THIS APPLICATION:
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim str As String
Dim confirm As Integer
CODE FOR ADD NEW PROFILE
Private Sub addnew_Click()
rs.addnew
clear
End Sub
Sub clear()
Text1.Text = ""
Text2.Text = ""
DTPicker1.Value = "10/05/2005"
Option1.Value = False
Option2.Value = False
Combo1.Text = "Select Department"
Combo2.Text = "Select Course"
Combo3.Text = "Select Semester"
Text3.Text = ""
Text4.Text = ""
Picture1.Picture = LoadPicture("")
End Sub
CODE FOR COMBOBOX SELECT OPTIONS
Private Sub Combo1_Click()
Combo2.clear
If Combo1.Text = "Computer Science" Then
Combo2.AddItem "M.C.A"
Combo2.AddItem "B.C.A"
Combo2.AddItem "B.Sc(IT)"
ElseIf Combo1.Text = "Electrical Engineering" Then
Combo2.AddItem "B.TECH (EE)"
Combo2.AddItem "M.TECH (EE)"
ElseIf Combo1.Text = "Civil Engineering" Then
Combo2.AddItem "B.TECH (CE)"
Combo2.AddItem "M.TECH (CE)"
Else
End If
End Sub
CODE FOR DELETE BUTTON
Private Sub deletebtn_Click()
confirm = MsgBox("Do you want to delete the Student Profile", vbYesNo + vbCritical, "Deletion Confirmation")
If confirm = vbYes Then
rs.Delete adAffectCurrent
MsgBox "Record has been Deleted successfully", vbInformation, "Message"
rs.Update
refreshdata
Else
MsgBox "Profile Not Deleted ..!!", vbInformation, "Message"
End If
End Sub
Sub refreshdata()
rs.Close
rs.Open "Select * from ProfileTBL", con, adOpenStatic, adLockPessimistic
If Not rs.EOF Then
rs.MoveNext
display
Else
MsgBox "No Record Found"
End If
End Sub
CODE FOR SEARCH PROFILE:
Private Sub findbtn_Click()
rs.Close
rs.Open "Select * from ProfileTBL where RollNo='" + Text1.Text + "'", con, adOpenDynamic, adLockPessimistic
If Not rs.EOF Then
display
reload
Else
MsgBox "Record Profile not found ..!!", vbInformation
End If
End Sub
Sub reload()
rs.Close
rs.Open "Select * from ProfileTBL", con, adOpenDynamic, adLockPessimistic
End Sub
Database Connectivity under FORM LOAD
Private Sub Form_Load()
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Database Folder\ProfileDB.mdb;Persist Security Info=False"
rs.Open "Select * from ProfileTBL", con, adOpenDynamic, adLockPessimistic
Combo1.AddItem "Computer Science"
Combo1.AddItem "Electrical Engineering"
Combo1.AddItem "Civil Engineering"
Combo3.AddItem "SEMESTER-I"
Combo3.AddItem "SEMESTER-II"
Combo3.AddItem "SEMESTER-III"
Combo3.AddItem "SEMESTER-IV"
Combo3.AddItem "SEMESTER-V"
Combo3.AddItem "SEMESTER-VI"
Combo3.AddItem "SEMESTER-VII"
Combo3.AddItem "SEMESTER-VIII"
display
End Sub
Sub display()
Text1.Text = rs!Rollno
Text2.Text = rs!Name
DTPicker1.Value = rs!DOB
If rs!Gender = "MALE" Then
Option1.Value = True
Else
Option2.Value = True
End If
Combo1.Text = rs!Dept
Combo2.Text = rs!Course
Combo3.Text = rs!Semester
Text3.Text = rs!Address
Text4.Text = rs!phone
Picture1.Picture = LoadPicture(rs!photo)
End Sub
CODE FOR RECORD NAVIGATION
Private Sub Firstbtn_Click()
rs.MoveFirst
display
End Sub
Private Sub lastbtn_Click()
rs.MoveLast
display
End Sub
Private Sub nextbtn_Click()
rs.MoveNext
If Not rs.EOF Then
display
Else
rs.MoveFirst
display
End If
End Sub
Private Sub Previousbtn_Click()
rs.MovePrevious
If rs.BOF Then
rs.MoveLast
display
Else
display
End If
End Sub
CODE FOR SAVE PROFILE
Private Sub savebtn_Click()
rs.Fields("RollNo").Value = Text1.Text
rs.Fields("Name").Value = Text2.Text
rs.Fields("DOB").Value = DTPicker1.Value
If Option1.Value = True Then
rs.Fields("Gender") = Option1.Caption
Else
rs.Fields("Gender") = Option2.Caption
End If
rs.Fields("Dept").Value = Combo1.Text
rs.Fields("Course").Value = Combo2.Text
rs.Fields("Semester").Value = Combo3.Text
rs.Fields("Address").Value = Text3.Text
rs.Fields("Phone").Value = Text4.Text
rs.Fields("Photo").Value = str
MsgBox "Data is saved successfully ..!!!", vbInformation
rs.Update
End Sub
CODE FOR UPDATE PROFILE
Private Sub updatebtn_Click()
rs.Fields("RollNo").Value = Text1.Text
rs.Fields("Name").Value = Text2.Text
rs.Fields("DOB").Value = DTPicker1.Value
If Option1.Value = True Then
rs.Fields("Gender") = Option1.Caption
Else
rs.Fields("Gender") = Option2.Caption
End If
rs.Fields("Dept").Value = Combo1.Text
rs.Fields("Course").Value = Combo2.Text
rs.Fields("Semester").Value = Combo3.Text
rs.Fields("Address").Value = Text3.Text
rs.Fields("Phone").Value = Text4.Text
MsgBox "Data is updated successfully ..!!!", vbInformation
rs.Update
End Sub
CODE FOR LOADING PICTURE
Private Sub uploadbtn_Click()
CommonDialog1.ShowOpen
CommonDialog1.Filter = "Jpeg|*.jpg"
str = CommonDialog1.FileName
Picture1.Picture = LoadPicture(str)
End Sub
Here is my updated List of Tutorials.
Advance Login System (Splash Screen with Progress Bar,User Registration,Login system,Welcome ) https://youtu.be/s-BU03egpWA
Add Delete Update Search https://youtu.be/K8jq2H3aamk
Data Report in VB6 https://youtu.be/vjQDtKMUCKk
Data Manager in VB6 https://youtu.be/27IrMsEXlBc
Create Tool Bar,Status Bar and Menu Bar https://youtu.be/3l6bciTAC7Q
Common dialog control- Font and Color Dialog https://youtu.be/4DBy2ghmu7U
Search Records in Database (By Name or ID) https://youtu.be/1yNScTVAqZ4
Login Form using Visual Basic 6.0 https://youtu.be/XXKjfta5kkg
Add Delete Update and Clear records https://youtu.be/tYS7uncH8Ds
Simple Visual Basic Database Application https://youtu.be/PldGe0-FnI8
Design Font Dialog Box in VB 6 https://youtu.be/C0CMtoXIFY4
Road Traffic lights Animated system https://youtu.be/74Zvl0bXeAY
ListBox Control( Advanced) https://youtu.be/Q6NYtmH7z9Q
ListBox Control -Add,Delete and Clear items https://youtu.be/YlmKSyk0l2k
Custom Progress Bar with percentage completed on Splash Screen https://youtu.be/jGSxrhYZAbE
Frame Control,Check Box and Option Buttons https://youtu.be/9x9dmM0V4CU
Picture Viewer+Browser in Visual Basic https://youtu.be/POd1Kmpvc0M
Splash Screen with Progress Bar- https://youtu.be/95hw5z7lq4A
Create Menus,Drop Down Menus ,Nested menus in Menu Bar https://youtu.be/fNtJaQgnuEs
for more about Visual Basic tutorials,please visit
Youtube Channel:https://www.youtube.com/user/sandydehrian
Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/
Please Share | Support | SUBSCRIBE
VB6 Control used are Textbox, OptionBox,Combobox,Picturebox,DatePicker ,Common Dialog controls
Features of Application are:
1.How to design the VB form and add various controls i.e Textbox, OptionBox,Combobox,Picturebox,DatePicker ,Common Dialog controls onto the form.
2.How to create database object at run time and do the database connectivity.
3.How to load the image onto the form using commondialog control and also Save /Retrieve the Image or Picture from the database.
4.How to save the values selected from Optionbox and Combobox into the database and retrieve them when required.
5.How to Use datepicker control and Save the Date into the Database.
6.How to Save ,Delete,Update and Search the Student profiles.
7.How to navigate between the profiles (First/Next/Previous/Last).
if you like my work,Please hit like button and SUBSCRIBE to my channel.
CODE FOR THIS APPLICATION:
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim str As String
Dim confirm As Integer
CODE FOR ADD NEW PROFILE
Private Sub addnew_Click()
rs.addnew
clear
End Sub
Sub clear()
Text1.Text = ""
Text2.Text = ""
DTPicker1.Value = "10/05/2005"
Option1.Value = False
Option2.Value = False
Combo1.Text = "Select Department"
Combo2.Text = "Select Course"
Combo3.Text = "Select Semester"
Text3.Text = ""
Text4.Text = ""
Picture1.Picture = LoadPicture("")
End Sub
CODE FOR COMBOBOX SELECT OPTIONS
Private Sub Combo1_Click()
Combo2.clear
If Combo1.Text = "Computer Science" Then
Combo2.AddItem "M.C.A"
Combo2.AddItem "B.C.A"
Combo2.AddItem "B.Sc(IT)"
ElseIf Combo1.Text = "Electrical Engineering" Then
Combo2.AddItem "B.TECH (EE)"
Combo2.AddItem "M.TECH (EE)"
ElseIf Combo1.Text = "Civil Engineering" Then
Combo2.AddItem "B.TECH (CE)"
Combo2.AddItem "M.TECH (CE)"
Else
End If
End Sub
CODE FOR DELETE BUTTON
Private Sub deletebtn_Click()
confirm = MsgBox("Do you want to delete the Student Profile", vbYesNo + vbCritical, "Deletion Confirmation")
If confirm = vbYes Then
rs.Delete adAffectCurrent
MsgBox "Record has been Deleted successfully", vbInformation, "Message"
rs.Update
refreshdata
Else
MsgBox "Profile Not Deleted ..!!", vbInformation, "Message"
End If
End Sub
Sub refreshdata()
rs.Close
rs.Open "Select * from ProfileTBL", con, adOpenStatic, adLockPessimistic
If Not rs.EOF Then
rs.MoveNext
display
Else
MsgBox "No Record Found"
End If
End Sub
CODE FOR SEARCH PROFILE:
Private Sub findbtn_Click()
rs.Close
rs.Open "Select * from ProfileTBL where RollNo='" + Text1.Text + "'", con, adOpenDynamic, adLockPessimistic
If Not rs.EOF Then
display
reload
Else
MsgBox "Record Profile not found ..!!", vbInformation
End If
End Sub
Sub reload()
rs.Close
rs.Open "Select * from ProfileTBL", con, adOpenDynamic, adLockPessimistic
End Sub
Database Connectivity under FORM LOAD
Private Sub Form_Load()
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Database Folder\ProfileDB.mdb;Persist Security Info=False"
rs.Open "Select * from ProfileTBL", con, adOpenDynamic, adLockPessimistic
Combo1.AddItem "Computer Science"
Combo1.AddItem "Electrical Engineering"
Combo1.AddItem "Civil Engineering"
Combo3.AddItem "SEMESTER-I"
Combo3.AddItem "SEMESTER-II"
Combo3.AddItem "SEMESTER-III"
Combo3.AddItem "SEMESTER-IV"
Combo3.AddItem "SEMESTER-V"
Combo3.AddItem "SEMESTER-VI"
Combo3.AddItem "SEMESTER-VII"
Combo3.AddItem "SEMESTER-VIII"
display
End Sub
Sub display()
Text1.Text = rs!Rollno
Text2.Text = rs!Name
DTPicker1.Value = rs!DOB
If rs!Gender = "MALE" Then
Option1.Value = True
Else
Option2.Value = True
End If
Combo1.Text = rs!Dept
Combo2.Text = rs!Course
Combo3.Text = rs!Semester
Text3.Text = rs!Address
Text4.Text = rs!phone
Picture1.Picture = LoadPicture(rs!photo)
End Sub
CODE FOR RECORD NAVIGATION
Private Sub Firstbtn_Click()
rs.MoveFirst
display
End Sub
Private Sub lastbtn_Click()
rs.MoveLast
display
End Sub
Private Sub nextbtn_Click()
rs.MoveNext
If Not rs.EOF Then
display
Else
rs.MoveFirst
display
End If
End Sub
Private Sub Previousbtn_Click()
rs.MovePrevious
If rs.BOF Then
rs.MoveLast
display
Else
display
End If
End Sub
CODE FOR SAVE PROFILE
Private Sub savebtn_Click()
rs.Fields("RollNo").Value = Text1.Text
rs.Fields("Name").Value = Text2.Text
rs.Fields("DOB").Value = DTPicker1.Value
If Option1.Value = True Then
rs.Fields("Gender") = Option1.Caption
Else
rs.Fields("Gender") = Option2.Caption
End If
rs.Fields("Dept").Value = Combo1.Text
rs.Fields("Course").Value = Combo2.Text
rs.Fields("Semester").Value = Combo3.Text
rs.Fields("Address").Value = Text3.Text
rs.Fields("Phone").Value = Text4.Text
rs.Fields("Photo").Value = str
MsgBox "Data is saved successfully ..!!!", vbInformation
rs.Update
End Sub
CODE FOR UPDATE PROFILE
Private Sub updatebtn_Click()
rs.Fields("RollNo").Value = Text1.Text
rs.Fields("Name").Value = Text2.Text
rs.Fields("DOB").Value = DTPicker1.Value
If Option1.Value = True Then
rs.Fields("Gender") = Option1.Caption
Else
rs.Fields("Gender") = Option2.Caption
End If
rs.Fields("Dept").Value = Combo1.Text
rs.Fields("Course").Value = Combo2.Text
rs.Fields("Semester").Value = Combo3.Text
rs.Fields("Address").Value = Text3.Text
rs.Fields("Phone").Value = Text4.Text
MsgBox "Data is updated successfully ..!!!", vbInformation
rs.Update
End Sub
CODE FOR LOADING PICTURE
Private Sub uploadbtn_Click()
CommonDialog1.ShowOpen
CommonDialog1.Filter = "Jpeg|*.jpg"
str = CommonDialog1.FileName
Picture1.Picture = LoadPicture(str)
End Sub
Advance Login System (Splash Screen with Progress Bar,User Registration,Login system,Welcome ) https://youtu.be/s-BU03egpWA
Add Delete Update Search https://youtu.be/K8jq2H3aamk
Data Report in VB6 https://youtu.be/vjQDtKMUCKk
Data Manager in VB6 https://youtu.be/27IrMsEXlBc
Create Tool Bar,Status Bar and Menu Bar https://youtu.be/3l6bciTAC7Q
Common dialog control- Font and Color Dialog https://youtu.be/4DBy2ghmu7U
Search Records in Database (By Name or ID) https://youtu.be/1yNScTVAqZ4
Login Form using Visual Basic 6.0 https://youtu.be/XXKjfta5kkg
Add Delete Update and Clear records https://youtu.be/tYS7uncH8Ds
Simple Visual Basic Database Application https://youtu.be/PldGe0-FnI8
Design Font Dialog Box in VB 6 https://youtu.be/C0CMtoXIFY4
Road Traffic lights Animated system https://youtu.be/74Zvl0bXeAY
ListBox Control( Advanced) https://youtu.be/Q6NYtmH7z9Q
ListBox Control -Add,Delete and Clear items https://youtu.be/YlmKSyk0l2k
Custom Progress Bar with percentage completed on Splash Screen https://youtu.be/jGSxrhYZAbE
Frame Control,Check Box and Option Buttons https://youtu.be/9x9dmM0V4CU
Picture Viewer+Browser in Visual Basic https://youtu.be/POd1Kmpvc0M
Splash Screen with Progress Bar- https://youtu.be/95hw5z7lq4A
Create Menus,Drop Down Menus ,Nested menus in Menu Bar https://youtu.be/fNtJaQgnuEs
for more about Visual Basic tutorials,please visit
Youtube Channel:https://www.youtube.com/user/sandydehrian
Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/
Please Share | Support | SUBSCRIBE
Thank You.
ReplyDeletehttps://www.anilmandal.com.np/
TY
ReplyDeletehttps://hardi-art.blogspot.com/
thant you
ReplyDeletehazeemgta@gmail.com
HI SIR
ReplyDeletecould you please send me the project I would like to develop something really similar to it.
thanks in advance.
Could please do tutorials on Spreadsheet for the same projects too.
ReplyDeletethat would be very helpful.
do you have a tutorial in making function about add, delete, search update in module in visual basic 6 using wampserver
ReplyDeleteThank you very much for this!
ReplyDeleteThis is more than usefull!
Have a nice day!
Thanks for your channel..
ReplyDeleteVery nice... ��
Thank you very much
ReplyDeletecan i use this code on visual studio 2015? Yes or not. Can you send me full source code zip file?
ReplyDeleteno
DeletePhone no out of range it's showing
ReplyDeleteThakyou
ReplyDeletesir could you please send me the project.. please. thank you so much
ReplyDeleteralvuin@gmail.com
Hello. I'm Brazilian, sorry for the language errors. Is your spreadsheet for sale or can you please send it to me? I would like to study it. Follow my email: evaldo.almeidasoares@gmail.com Thank you very much!
ReplyDeleteSir can you pls send me the project file to my email It would be very helpful. oisci0435@gmail.com
ReplyDeleteplease can you send me the project @shaq.chidoori@gmail.com
ReplyDeleteExcellent work done by you sir,
ReplyDeleteI am very much happy by seeing your you tube and blog I subscribed also.
Sir I want to contact u how should I it's urgent.. 🙏
ReplyDeleteBom dia.
ReplyDeleteGostei muito deste projeto, por favor podes me enviar o projecto.
xietosambuquila22@gmail.com
sir could you please send me the project.. please. thank you so much mehmetmirdal@hotmail.com
ReplyDeletesir could you please send me the project.. please.
ReplyDeletewww.mohammadullah.kareemzai@gmail.com
Please send it to me i am waiting for it thank you very much
Thanks very much !!!!!
ReplyDeleteThanks very much sir for all your free tutorials, they have really been helpful to me so far in my computer science career. please sir my major problem is the package and deployment wizard in vb 6.0. anytime i try to package a solution it shows "Unexpected error 429 has occured: ActiveX component can't create object". please sir kindly help out with a solution. here is my email "omoniyishola90@gmail.com" whatsapp "+2347066109170" thanks in anticipation.
ReplyDeletevery good
ReplyDeletethanks
sir could you please send me the project.. please. thank you so much
ReplyDeleteferosekhan5767@gmail.com
senhor poderia me enviar o projeto.. por favor. muito obrigado
Deleterobsonslz@gmail.com
GRACIAS!
ReplyDeleteI m grateful to follow you tutorial. I m using to teach my student
ReplyDeleteComputer Gyan: Create,Save,Update,Delete And Search Student Profile Using Visual Basic ... >>>>> Download Now
ReplyDelete>>>>> Download Full
Computer Gyan: Create,Save,Update,Delete And Search Student Profile Using Visual Basic ... >>>>> Download LINK
>>>>> Download Now
Computer Gyan: Create,Save,Update,Delete And Search Student Profile Using Visual Basic ... >>>>> Download Full
>>>>> Download LINK
we face any issue regarding its servicing or any technical problem, we try to solve it as soon as possible and that too from well trained professionals. Dell Laptop Service Center will help you come out and give you benefits of high quality service. Their expert technicians ensure that you get all your laptops issues resolved timely and in accost effective manner.
ReplyDeleteDell Laptop Service Center in Noida
Dell Laptop Service Center in Noida Sector-18
Dell Laptop Service Center in Noida Sector-62
Dell Laptop Service Center in Noida Sector-15,16
Dell Laptop Service Center in Noida Sector-50,51,52
Computers have improved the quality of entertainment. Llimink triple monitor
ReplyDeleteWhy Save button and update button have same code? and when i pressed update the data keep duplicating in my database?
ReplyDelete