SlideShare uma empresa Scribd logo
1 de 3
Ahmad Mustaqim | 12100408 1
                                                                                                      kursus

                                                       bcancel.Enabled = False

                                                       bsave.Enabled = False

                                                       End Sub

                                                       Sub aktif()

                                                       tkode.Enabled = True

                                                       tnis.Enabled = True

                                                       tnama.Enabled = True

                                                       cmapel.Enabled = True

                                                       tnominal.Enabled = True
MODUL
                                                       binputlagi.Enabled = True
Public dbado As New ADODB.Connection
                                                       bcancel.Enabled = True
Public rssiswa As New ADODB.Recordset
                                                       bsave.Enabled = True
Public rsbayar As New ADODB.Recordset
                                                       End Sub
Public rsdetail As New ADODB.Recordset
                                                       Sub bersih()

                                                       tkode = ""
Public Sub koneksi()
                                                       tnis = ""
If dbado.State = adStateOpen Then
                                                       tnama = ""
dbado.Close
                                                       cmapel.Text = ""
End If
                                                       tnominal = ""
dbado.ConnectionString =
"provider=MSDASQL.1;persist security info=false;data   End Sub
source=kursus"
                                                       Sub kd()
dbado.Open
                                                       Dim code, a, b As String
End Sub
                                                       code = "SELECT * from bayar"

                                                       Set rsbayar = dbado.Execute(code, , adCmdText)
LISTING
                                                       If rsbayar.BOFAndrsbayar.EOF Then
Sub nonaktif()
                                                       tkode.Text = "B" &Format(Date, "yymm") & "001"
tkode.Enabled = False
                                                       Else
tnis.Enabled = False
                                                       a=0
tnama.Enabled = False
                                                       rsbayar.MoveFirst
cmapel.Enabled = False
                                                       Do Until rsbayar.EOF
tnominal.Enabled = False
                                                       a=a+1
binputlagi.Enabled = False
Ahmad Mustaqim | 12100408 2
                                                                                                    kursus

rsbayar.MoveNext                                      sdetail = "insert into detail_bayar ()values('"
                                                      &tkode.Text& "','" &cmapel.Text& "','"
Loop                                                  &tnominal.Text& "')"
a=a+1                                                 Set rsdetail = dbado.Execute(sdetail, , adCmdText)
b = Len(Str(a))                                       tabel
tkode.Text = "B" &Format(Date, "yymm") &              cmapel.Text = ""
Mid$("000", 1, 4 - b) & a
                                                      tnominal.Text = ""
End If
                                                      cmapel.SetFocus
End Sub
                                                      End Sub
Sub tabel()

sqlbayar = "select * from detail_bayar"
                                                      Private Sub bnew_Click()
Set rsdetail = dbado.Execute(sqlbayar, , adCmdText)
                                                      aktif
Set Grid1.DataSource = rsdetail
                                                      bersih
End Sub
                                                      kd

                                                      tnis.SetFocus
Private Sub bcancel_Click()
                                                      End Sub
sqldel = "delete from detail_bayar where kode='"
&tkode.Text& "'"

Set rsdetail = dbado.Execute(sqldel, , adCmdText)     Private Sub bsave_Click()

tabel                                                 Dim save As String

bersih                                                If tnis.Text = "" Then

nonaktif                                              MsgBox ("DATA BELUNG LENGKAP!Silahkan input
                                                      nislalu ENTER")
End Sub
                                                      tnis.SetFocus

                                                      Else
Private Sub bclose_Click()
                                                      If tnama.Text = "" Then
X = MsgBox("YAkinmaukeluar form?", vbYesNo,
"konfirmasi")                                         MsgBox ("DATA BELUNG LENGKAP!Silahkan input
                                                      nislalu ENTER")
If X = vbYes Then
                                                      tnis.SetFocus
End
                                                      Else
End If
                                                      If cmapel.Text = "" Then
End Sub
                                                      MsgBox ("DATA BELUNG LENGKAP")

                                                      cmapel.SetFocus
Private Sub binputlagi_Click()
                                                      Else
Ahmad Mustaqim | 12100408 3
                                                                                                        kursus

If tnominal.Text = "" Then                                 Private Sub Form_Activate()

MsgBox" DATA BELUNG LENGKAP"                               nonaktif

tnominal.SetFocus                                          LBLTANGGAL.Caption = Format(Date, "yyyy-mm-dd")

Else                                                       cmapel.AddItem ("Matematika")

save = "insert into bayar ()values('" &tkode.Text& "','"   cmapel.AddItem ("B.Inggris")
&tnis.Text& "','" &LBLTANGGAL.Caption& "')"
                                                           cmapel.AddItem ("B.Indonesia")
Set rsbayar = dbado.Execute(save, , adCmdText)
                                                           cmapel.AddItem ("Komputer")
sdetail = "insert into detail_bayar ()values('"
&tkode.Text& "','" &cmapel.Text& "','"                     cmapel.AddItem ("IPA")
&tnominal.Text& "')"
                                                           cmapel.AddItem ("IPS")
Set rsdetail = dbado.Execute(sdetail, , adCmdText)
                                                           tabel
MsgBox "Data Tersimpan"
                                                           End Sub
tabel

nonaktif
                                                           Private Sub Form_Load()
End If
                                                           koneksi
End If
                                                           End Sub
End If

End If
                                                           Private Sub tnis_KeyPress(KeyAscii As Integer)
End Sub
                                                           If KeyAscii = 13 Then

                                                           nis = "select*from siswa where nis='" &tnis.Text& "'"
Private Sub cmapel_Click()
                                                           Set rssiswa = dbado.Execute(nis, , adCmdText)
ck = "select * from detail_bayar where kode='"
                                                           If rssiswa.EOF Then
&tkode.Text& "' and matpel='" &cmapel.Text& "'"
                                                           MsgBox "NIS "&tnis.Text& " tidakditemukan!
Set rsdetail = dbado.Execute(ck, , adCmdText)
                                                           Silahkancoba NIS lain!"
  If rsdetail.BOFAndrsdetail.EOF Then
                                                           tnis = ""
tnominal.SetFocus
                                                           tnis.SetFocus
  Else
                                                           Else
MsgBox " Mapel '" &cmapel.Text& "' SUDAH Di
                                                           tnama = rssiswa!nama
bayar!"
                                                           cmapel.SetFocus
cmapel.SetFocus
                                                           End If
  End If End Sub
                                                           End If

                                                           End Sub

Mais conteúdo relacionado

Mais procurados

Vb Project ขั้นเทพ
Vb Project ขั้นเทพVb Project ขั้นเทพ
Vb Project ขั้นเทพSinchai Lanon
 
Moving to hybrid relational/JSON data models
Moving to hybrid relational/JSON data modelsMoving to hybrid relational/JSON data models
Moving to hybrid relational/JSON data modelsMariaDB plc
 
First few months with Kotlin - Introduction through android examples
First few months with Kotlin - Introduction through android examplesFirst few months with Kotlin - Introduction through android examples
First few months with Kotlin - Introduction through android examplesNebojša Vukšić
 
Tree-Based Methods (Article 8 - Practical Exercises)
Tree-Based Methods (Article 8 - Practical Exercises)Tree-Based Methods (Article 8 - Practical Exercises)
Tree-Based Methods (Article 8 - Practical Exercises)Theodore Grammatikopoulos
 
The Chain Rule Powerpoint Lesson
The Chain Rule Powerpoint LessonThe Chain Rule Powerpoint Lesson
The Chain Rule Powerpoint LessonPaul Hawks
 
Using semi-structured data in modern applications
Using semi-structured data in modern applicationsUsing semi-structured data in modern applications
Using semi-structured data in modern applicationsMariaDB plc
 

Mais procurados (8)

Underscore
UnderscoreUnderscore
Underscore
 
Vb Project ขั้นเทพ
Vb Project ขั้นเทพVb Project ขั้นเทพ
Vb Project ขั้นเทพ
 
Moving to hybrid relational/JSON data models
Moving to hybrid relational/JSON data modelsMoving to hybrid relational/JSON data models
Moving to hybrid relational/JSON data models
 
First few months with Kotlin - Introduction through android examples
First few months with Kotlin - Introduction through android examplesFirst few months with Kotlin - Introduction through android examples
First few months with Kotlin - Introduction through android examples
 
Tree-Based Methods (Article 8 - Practical Exercises)
Tree-Based Methods (Article 8 - Practical Exercises)Tree-Based Methods (Article 8 - Practical Exercises)
Tree-Based Methods (Article 8 - Practical Exercises)
 
Chain rule
Chain ruleChain rule
Chain rule
 
The Chain Rule Powerpoint Lesson
The Chain Rule Powerpoint LessonThe Chain Rule Powerpoint Lesson
The Chain Rule Powerpoint Lesson
 
Using semi-structured data in modern applications
Using semi-structured data in modern applicationsUsing semi-structured data in modern applications
Using semi-structured data in modern applications
 

Semelhante a Kursus

Lampiran source code
Lampiran source codeLampiran source code
Lampiran source codeancunk
 
Aplikasi data penduduk
Aplikasi data pendudukAplikasi data penduduk
Aplikasi data pendudukAdi Putra
 
Aplikasi data penduduk
Aplikasi data pendudukAplikasi data penduduk
Aplikasi data pendudukAdi Putra
 
Visual Studio.Net - Sql Server
Visual Studio.Net - Sql ServerVisual Studio.Net - Sql Server
Visual Studio.Net - Sql ServerDarwin Durand
 
Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]testduser1
 
Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]User1test
 
SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)Darwin Durand
 
The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 32 of 196
The Ring programming language version 1.7 book - Part 32 of 196The Ring programming language version 1.7 book - Part 32 of 196
The Ring programming language version 1.7 book - Part 32 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 36 of 210
The Ring programming language version 1.9 book - Part 36 of 210The Ring programming language version 1.9 book - Part 36 of 210
The Ring programming language version 1.9 book - Part 36 of 210Mahmoud Samir Fayed
 

Semelhante a Kursus (16)

Rental
RentalRental
Rental
 
Lampiran source code
Lampiran source codeLampiran source code
Lampiran source code
 
Aplikasi data penduduk
Aplikasi data pendudukAplikasi data penduduk
Aplikasi data penduduk
 
Aplikasi data penduduk
Aplikasi data pendudukAplikasi data penduduk
Aplikasi data penduduk
 
Kode vb.net
Kode vb.netKode vb.net
Kode vb.net
 
Kode vb.net
Kode vb.netKode vb.net
Kode vb.net
 
Visual Studio.Net - Sql Server
Visual Studio.Net - Sql ServerVisual Studio.Net - Sql Server
Visual Studio.Net - Sql Server
 
Corona sdk
Corona sdkCorona sdk
Corona sdk
 
Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]
 
Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]
 
SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)
 
The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84
 
The Ring programming language version 1.7 book - Part 32 of 196
The Ring programming language version 1.7 book - Part 32 of 196The Ring programming language version 1.7 book - Part 32 of 196
The Ring programming language version 1.7 book - Part 32 of 196
 
Quanlycanbo
QuanlycanboQuanlycanbo
Quanlycanbo
 
The Ring programming language version 1.9 book - Part 36 of 210
The Ring programming language version 1.9 book - Part 36 of 210The Ring programming language version 1.9 book - Part 36 of 210
The Ring programming language version 1.9 book - Part 36 of 210
 
Listing program
Listing programListing program
Listing program
 

Último

Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 

Último (20)

Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 

Kursus

  • 1. Ahmad Mustaqim | 12100408 1 kursus bcancel.Enabled = False bsave.Enabled = False End Sub Sub aktif() tkode.Enabled = True tnis.Enabled = True tnama.Enabled = True cmapel.Enabled = True tnominal.Enabled = True MODUL binputlagi.Enabled = True Public dbado As New ADODB.Connection bcancel.Enabled = True Public rssiswa As New ADODB.Recordset bsave.Enabled = True Public rsbayar As New ADODB.Recordset End Sub Public rsdetail As New ADODB.Recordset Sub bersih() tkode = "" Public Sub koneksi() tnis = "" If dbado.State = adStateOpen Then tnama = "" dbado.Close cmapel.Text = "" End If tnominal = "" dbado.ConnectionString = "provider=MSDASQL.1;persist security info=false;data End Sub source=kursus" Sub kd() dbado.Open Dim code, a, b As String End Sub code = "SELECT * from bayar" Set rsbayar = dbado.Execute(code, , adCmdText) LISTING If rsbayar.BOFAndrsbayar.EOF Then Sub nonaktif() tkode.Text = "B" &Format(Date, "yymm") & "001" tkode.Enabled = False Else tnis.Enabled = False a=0 tnama.Enabled = False rsbayar.MoveFirst cmapel.Enabled = False Do Until rsbayar.EOF tnominal.Enabled = False a=a+1 binputlagi.Enabled = False
  • 2. Ahmad Mustaqim | 12100408 2 kursus rsbayar.MoveNext sdetail = "insert into detail_bayar ()values('" &tkode.Text& "','" &cmapel.Text& "','" Loop &tnominal.Text& "')" a=a+1 Set rsdetail = dbado.Execute(sdetail, , adCmdText) b = Len(Str(a)) tabel tkode.Text = "B" &Format(Date, "yymm") & cmapel.Text = "" Mid$("000", 1, 4 - b) & a tnominal.Text = "" End If cmapel.SetFocus End Sub End Sub Sub tabel() sqlbayar = "select * from detail_bayar" Private Sub bnew_Click() Set rsdetail = dbado.Execute(sqlbayar, , adCmdText) aktif Set Grid1.DataSource = rsdetail bersih End Sub kd tnis.SetFocus Private Sub bcancel_Click() End Sub sqldel = "delete from detail_bayar where kode='" &tkode.Text& "'" Set rsdetail = dbado.Execute(sqldel, , adCmdText) Private Sub bsave_Click() tabel Dim save As String bersih If tnis.Text = "" Then nonaktif MsgBox ("DATA BELUNG LENGKAP!Silahkan input nislalu ENTER") End Sub tnis.SetFocus Else Private Sub bclose_Click() If tnama.Text = "" Then X = MsgBox("YAkinmaukeluar form?", vbYesNo, "konfirmasi") MsgBox ("DATA BELUNG LENGKAP!Silahkan input nislalu ENTER") If X = vbYes Then tnis.SetFocus End Else End If If cmapel.Text = "" Then End Sub MsgBox ("DATA BELUNG LENGKAP") cmapel.SetFocus Private Sub binputlagi_Click() Else
  • 3. Ahmad Mustaqim | 12100408 3 kursus If tnominal.Text = "" Then Private Sub Form_Activate() MsgBox" DATA BELUNG LENGKAP" nonaktif tnominal.SetFocus LBLTANGGAL.Caption = Format(Date, "yyyy-mm-dd") Else cmapel.AddItem ("Matematika") save = "insert into bayar ()values('" &tkode.Text& "','" cmapel.AddItem ("B.Inggris") &tnis.Text& "','" &LBLTANGGAL.Caption& "')" cmapel.AddItem ("B.Indonesia") Set rsbayar = dbado.Execute(save, , adCmdText) cmapel.AddItem ("Komputer") sdetail = "insert into detail_bayar ()values('" &tkode.Text& "','" &cmapel.Text& "','" cmapel.AddItem ("IPA") &tnominal.Text& "')" cmapel.AddItem ("IPS") Set rsdetail = dbado.Execute(sdetail, , adCmdText) tabel MsgBox "Data Tersimpan" End Sub tabel nonaktif Private Sub Form_Load() End If koneksi End If End Sub End If End If Private Sub tnis_KeyPress(KeyAscii As Integer) End Sub If KeyAscii = 13 Then nis = "select*from siswa where nis='" &tnis.Text& "'" Private Sub cmapel_Click() Set rssiswa = dbado.Execute(nis, , adCmdText) ck = "select * from detail_bayar where kode='" If rssiswa.EOF Then &tkode.Text& "' and matpel='" &cmapel.Text& "'" MsgBox "NIS "&tnis.Text& " tidakditemukan! Set rsdetail = dbado.Execute(ck, , adCmdText) Silahkancoba NIS lain!" If rsdetail.BOFAndrsdetail.EOF Then tnis = "" tnominal.SetFocus tnis.SetFocus Else Else MsgBox " Mapel '" &cmapel.Text& "' SUDAH Di tnama = rssiswa!nama bayar!" cmapel.SetFocus cmapel.SetFocus End If End If End Sub End If End Sub