SlideShare a Scribd company logo
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

More Related Content

What's hot

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 models
MariaDB 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 examples
Nebojš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 Lesson
Paul 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 applications
MariaDB plc
 

What's hot (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
 

Similar to 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
 
Kode vb.net
Kode vb.netKode vb.net
Kode vb.net
Azki Nabidin
 
Visual Studio.Net - Sql Server
Visual Studio.Net - Sql ServerVisual Studio.Net - Sql Server
Visual Studio.Net - Sql Server
Darwin Durand
 
Corona sdk
Corona sdkCorona 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]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 84
Mahmoud 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 196
Mahmoud 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 210
Mahmoud Samir Fayed
 

Similar to 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
 

Recently uploaded

Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 

Recently uploaded (20)

Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 

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