SlideShare une entreprise Scribd logo
1  sur  3
Télécharger pour lire hors ligne
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

Contenu connexe

Dernier

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Dernier (20)

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

En vedette

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)
 

En vedette (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