SlideShare a Scribd company logo
Tugas Pemrograman VB-6 (Asep Jalaludin,S.T.,M.M.) Tanggal : 14 April 2014
STMIK MIC Cikarang Halaman - 1
Pengetikan Coding pada Form Front Office :
Tombol : Tambah
Private Sub Command1_Click(Index As Integer)
Text1.SetFocus
Adodc1.Recordset.AddNew
pesan = MsgBox("Anda mau menambah data?", vbInformation, "Informasi")
Text1.Text = ""
Text2.Text = ""
Combo1.Text = ""
Combo2.Text = ""
Adodc1.Recordset!nip = ""
Adodc1.Recordset!nama_peg = ""
Adodc1.Recordset!shift = ""
Adodc1.Recordset!Status = ""
End Sub
Tombol : Simpan
Private Sub command2_Click(Index As Integer)
Adodc1.Recordset.Fields("nip") = Text1.Text
Adodc1.Recordset.Fields("nama_peg") = Text2.Text
Adodc1.Recordset.Fields("shift") = Combo1.Text
Adodc1.Recordset.Fields("status") = Combo2.Text
MsgBox "Data sudah disimpan"
Text1.Text = ""
Text2.Text = ""
Combo1.Text = ""
Combo2.Text = ""
End Sub
Tugas Pemrograman VB-6 (Asep Jalaludin,S.T.,M.M.) Tanggal : 14 April 2014
STMIK MIC Cikarang Halaman - 2
Tombol : Edit
Private Sub Command3_Click(Index As Integer)
Adodc1.Recordset!nip = Text1.Text
Adodc1.Recordset!nama_peg = Text2.Text
Adodc1.Recordset!shift = Combo1.Text
Adodc1.Recordset!Status = Combo2.Text
Adodc1.Recordset.Update
MsgBox "Data sudah diubah"
End Sub
Tombol : Hapus
Private Sub Command4_Click(Index As Integer)
Adodc1.Recordset.Delete
Text1.Text = ""
Text2.Text = ""
Combo1.Text = ""
Combo2.Text = ""
MsgBox "Data sudah dihapus"
Adodc1.Refresh
End Sub
Tombol : Batal
Private Sub Command5_Click(Index As Integer)
Text1.Text = ""
Text2.Text = ""
Combo1.Text = ""
Combo2.Text = ""
End Sub
Tombol : Tutup
Private Sub Command6_Click(Index As Integer)
Unload Me
End Sub
Datagrid (klik 2x) :
Private Sub DataGrid1_Click()
Text1 = Adodc1.Recordset!nip
Text2 = Adodc1.Recordset!nama_peg
Combo1 = Adodc1.Recordset!shift
Combo2 = Adodc1.Recordset!Status
End Sub
Coding di Form Load untuk menampilkan Combo1 dan Combo2 :
Private Sub Form_Load()
Combo1.Clear
Combo1.AddItem "1"
Combo1.AddItem "2"
Combo2.Clear
Tugas Pemrograman VB-6 (Asep Jalaludin,S.T.,M.M.) Tanggal : 14 April 2014
STMIK MIC Cikarang Halaman - 3
Combo2.AddItem "Tetap"
Combo2.AddItem "Tidak Tetap"
End Sub
Text1.text (Klik 2x) :
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Adodc1.Recordset.MoveFirst
Do While Not Adodc1.Recordset.EOF
If Adodc1.Recordset!nip = Text1.Text Then
MsgBox "Data ditemukan"
Text2 = Adodc1.Recordset!nama_peg
Combo1 = Adodc1.Recordset!shift
Combo2 = Adodc1.Recordset!Status
Exit Do
Else
Adodc1.Recordset.MoveNext
End If
Loop
End If
If Not (KeyAscii >= Asc("0") & Chr(13) _
And KeyAscii <= Asc("9") & Chr(13) _
Or KeyAscii = vbKeyBack _
Or KeyAscii = vbKeyDelete _
Or KeyAscii = vbKeySpace) Then
Beep
KeyAscii = 0
End If
End Sub

More Related Content

Recently uploaded

Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
YibeltalNibretu
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 

Recently uploaded (20)

Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
Advances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdfAdvances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdf
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
Forest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDFForest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDF
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
 
NLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxNLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Tugas pemrograman vb6 pengetikan coding pada form front office

  • 1. Tugas Pemrograman VB-6 (Asep Jalaludin,S.T.,M.M.) Tanggal : 14 April 2014 STMIK MIC Cikarang Halaman - 1 Pengetikan Coding pada Form Front Office : Tombol : Tambah Private Sub Command1_Click(Index As Integer) Text1.SetFocus Adodc1.Recordset.AddNew pesan = MsgBox("Anda mau menambah data?", vbInformation, "Informasi") Text1.Text = "" Text2.Text = "" Combo1.Text = "" Combo2.Text = "" Adodc1.Recordset!nip = "" Adodc1.Recordset!nama_peg = "" Adodc1.Recordset!shift = "" Adodc1.Recordset!Status = "" End Sub Tombol : Simpan Private Sub command2_Click(Index As Integer) Adodc1.Recordset.Fields("nip") = Text1.Text Adodc1.Recordset.Fields("nama_peg") = Text2.Text Adodc1.Recordset.Fields("shift") = Combo1.Text Adodc1.Recordset.Fields("status") = Combo2.Text MsgBox "Data sudah disimpan" Text1.Text = "" Text2.Text = "" Combo1.Text = "" Combo2.Text = "" End Sub
  • 2. Tugas Pemrograman VB-6 (Asep Jalaludin,S.T.,M.M.) Tanggal : 14 April 2014 STMIK MIC Cikarang Halaman - 2 Tombol : Edit Private Sub Command3_Click(Index As Integer) Adodc1.Recordset!nip = Text1.Text Adodc1.Recordset!nama_peg = Text2.Text Adodc1.Recordset!shift = Combo1.Text Adodc1.Recordset!Status = Combo2.Text Adodc1.Recordset.Update MsgBox "Data sudah diubah" End Sub Tombol : Hapus Private Sub Command4_Click(Index As Integer) Adodc1.Recordset.Delete Text1.Text = "" Text2.Text = "" Combo1.Text = "" Combo2.Text = "" MsgBox "Data sudah dihapus" Adodc1.Refresh End Sub Tombol : Batal Private Sub Command5_Click(Index As Integer) Text1.Text = "" Text2.Text = "" Combo1.Text = "" Combo2.Text = "" End Sub Tombol : Tutup Private Sub Command6_Click(Index As Integer) Unload Me End Sub Datagrid (klik 2x) : Private Sub DataGrid1_Click() Text1 = Adodc1.Recordset!nip Text2 = Adodc1.Recordset!nama_peg Combo1 = Adodc1.Recordset!shift Combo2 = Adodc1.Recordset!Status End Sub Coding di Form Load untuk menampilkan Combo1 dan Combo2 : Private Sub Form_Load() Combo1.Clear Combo1.AddItem "1" Combo1.AddItem "2" Combo2.Clear
  • 3. Tugas Pemrograman VB-6 (Asep Jalaludin,S.T.,M.M.) Tanggal : 14 April 2014 STMIK MIC Cikarang Halaman - 3 Combo2.AddItem "Tetap" Combo2.AddItem "Tidak Tetap" End Sub Text1.text (Klik 2x) : Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Adodc1.Recordset.MoveFirst Do While Not Adodc1.Recordset.EOF If Adodc1.Recordset!nip = Text1.Text Then MsgBox "Data ditemukan" Text2 = Adodc1.Recordset!nama_peg Combo1 = Adodc1.Recordset!shift Combo2 = Adodc1.Recordset!Status Exit Do Else Adodc1.Recordset.MoveNext End If Loop End If If Not (KeyAscii >= Asc("0") & Chr(13) _ And KeyAscii <= Asc("9") & Chr(13) _ Or KeyAscii = vbKeyBack _ Or KeyAscii = vbKeyDelete _ Or KeyAscii = vbKeySpace) Then Beep KeyAscii = 0 End If End Sub