Nama : Nurafifah Dwi Putri Aulia
Npm : 15116567
Kelas : 1ka03
Private Sub Timer1_Timer()
Form3.Show
Unload Me
End Sub
Private Sub Command1_Click()
Form6.Show
'Menampilkan Form6 ketika Command Button diklik.
Unload Me
'Menutup Form3 ketika Form6 terbuka
End Sub
Private Sub Command2_Click()
Form5.Show
'Menampilkan form5 ketika command button diklik.
Unload Me
'menutup form3 ketika form5 terbuka
End Sub
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields(0) = Text3.Text
Adodc1.Recordset.Fields(1) = Text1.Text
Adodc1.Recordset.Fields(2) = Text4.Text
Adodc1.Recordset.Fields(3) = Text5.Text
Adodc1.Recordset.Update
MsgBox ("Silakan Login"), vbInformation,
"WARNING!"
End Sub
Private Sub Command2_Click()
Form3.Show
'Menampilkan form3 ketika command button diklik.
Unload Me
'menutup form6 ketika form3 terbuka
End Sub
Private Sub Command1_Click()
If conn.State = 1 Then conn.Close
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Users\dell\Desktop\username.mdb;Persist Security Info=False"
If RS.State = 1 Then RS.Close
RS.Open "select * from login where username= '"
& Text1.Text & "' And password = '" & Text2.Text &
"'", conn, 3, 3
If Not RS.EOF Then
MsgBox ("BERHASIL"), vbinformation, “Pesan”
Form1.Show
Unload Me
Else
MsgBox ("password dan username salah"),
vbInformation, "WARNING!"
End If
End Sub
Private Sub Command2_Click()
Form3.Show
Unload Me
End SubPrivate Sub Command1_Click()
If conn.State = 1 Then conn.Close
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\dell\Desktop\username.mdb;Persist
Security Info=False"
If RS.State = 1 Then RS.Close
RS.Open "select * from login where username= '"
& Text1.Text & "' And password = '" & Text2.Text &
"'", conn, 3, 3
If Not RS.EOF Then
MsgBox "BERHASIL"
Form1.Show
Unload Me
Else
MsgBox ("password dan username salah"),
vbInformation, "WARNING!"
End If
End Sub
Private Sub Command2_Click()
Form3.Show
Unload Me
End Sub
Private Sub Command1_Click()
Form2.Show
'Menampilkan form2 ketika command button diklik.
Unload Me
'menutup form1 ketika form2 terbuka
End Sub
Private Sub Command2_Click()
Form7.Show
'Menampilkan form7 ketika command button diklik.
Unload Me
'menutup form1 ketika form7 terbuka
End Sub
Private Sub Command3_Click()
Form9.Show
'Menampilkan form9 ketika command button diklik.
Unload Me
'menutup form1 ketika form9 terbuka
End Sub
Private Sub Command4_Click()
Form3.Show
Unload Me
End Sub
Private Sub Command1_Click()
Text1.Text = Val(Text3.Text) + Val(Text4.Text) +
Val(Text5.Text)
End Sub
Private Sub Command10_Click()
If Text14.Text = "1" Then
Text7.Text = 40000
ElseIf Text14.Text = "2" Then
Text7.Text = 80000
ElseIf Text14.Text = "3" Then
Text7.Text = 120000
ElseIf Text14.Text = "4" Then
Text7.Text = 160000
ElseIf Text14.Text = "5" Then
Text7.Text = 200000
End If
End Sub
Private Sub Command2_Click()
Text2.Text = Val(Text6.Text) + Val(Text7.Text) +
Val(Text8.Text)
End Sub
Private Sub Command11_Click()
If Text13.Text = "1" Then
Text8.Text = 40000
ElseIf Text13.Text = "2" Then
Text8.Text = 80000
ElseIf Text13.Text = "3" Then
Text8.Text = 120000
ElseIf Text13.Text = "4" Then
Text8.Text = 160000
ElseIf Text13.Text = "5" Then
Text8.Text = 200000
End If
End Sub
Private Sub Command3_Click()
Form1.Show
'Menampilkan form1 ketika command button diklik.
Unload Me
'menutup form2 ketika form1 terbuka
End Sub
Private Sub Command4_Click()
MsgBox "Permintaan Anda telah berhasil!",
vbInformation, "pesan"
End Sub
Private Sub Command5_Click()
Text9.Text = Val(Text1.Text) + Val(Text2.Text)
End Sub
Private Sub Command6_Click()
If Text12.Text = "1" Then
Text3.Text = 30000
ElseIf Text12.Text = "2" Then
Text3.Text = 60000
ElseIf Text12.Text = "3" Then
Text3.Text = 90000
ElseIf Text12.Text = "4" Then
Text3.Text = 120000
ElseIf Text12.Text = "5" Then
Text3.Text = 150000
End If
End Sub
Private Sub Command7_Click()
If Text11.Text = "1" Then
Text4.Text = 35000
ElseIf Text11.Text = "2" Then
Text4.Text = 70000
ElseIf Text11.Text = "3" Then
Text4.Text = 105000
ElseIf Text11.Text = "4" Then
Text4.Text = 140000
ElseIf Text11.Text = "5" Then
Text4.Text = 175000
End If
End Sub
Private Sub Command8_Click()
If Text10.Text = "1" Then
Text5.Text = 35000
ElseIf Text10.Text = "2" Then
Text5.Text = 70000
ElseIf Text10.Text = "3" Then
Text5.Text = 105000
ElseIf Text10.Text = "4" Then
Text5.Text = 140000
ElseIf Text10.Text = "5" Then
Text5.Text = 175000
End If
End Sub
Private Sub Command9_Click()
If Text15.Text = "1" Then
Text6.Text = 35000
ElseIf Text15.Text = "2" Then
Text6.Text = 70000
ElseIf Text15.Text = "3" Then
Text6.Text = 105000
ElseIf Text15.Text = "4" Then
Text6.Text = 140000
ElseIf Text15.Text = "5" Then
Text6.Text = 175000
End If
End Sub
Private Sub Command12_Click()
Form11.Label7 = Text3.Text
Form11.Label9 = Text4.Text
Form11.Label11 = Text5.Text
Form11.Label3 = Text1.Text
Form11.Label16 = Text6.Text
Form11.Label17 = Text7.Text
Form11.Label18 = Text8.Text
Form11.Label19 = Text2.Text
Form11.Text1 = Text9.Text
Form11.Show
Unload Me
End Sub
Private Sub Command1_Click()
Form1.Show
'Menampilkan form1 ketika command button diklik.
Unload Me
'menutup form7 ketika form1 terbuka
End Sub
Private Sub Command2_Click()
MsgBox "Pemesanan Anda telah berhasil, silakan klik
tombol pemesanan untuk melihat pesanan Anda!", vbInformation,
"pesan"
End Sub
Private Sub Command3_Click()
Text9.Text = Val(Text4.Text) * Val(Text8.Text)
End Sub
Private Sub Command4_Click()
Form10.Text1 = Text1.Text
Form10.Text2 = Text2.Text
Form10.Text3 = Text6.Text
Form10.Text4 = Text7.Text
Form10.Text5 = Text3.Text
Form10.Text6 = Text4.Text
Form10.Text7 = Text8.Text
Form10.Text8 = Text9.Text
Form10.Text10 = Text5.Text
Form10.Show
Unload Me
End Sub
Private Sub Command5_Click()
Text7.Text = Val(Text6.Text) * Val(Text2.Text)
End Sub
Private Sub Command7_Click()
Text5.Text = Val(Text7.Text) + Val(Text9.Text)
End Sub
Private Sub CmdDelete_Click(Index As Integer)
PESAN = MsgBox("APAKAH ANDA YAKIN??",
vbInformation + vbYesNo, "WARNING")
If PESAN = vbYes Then
Adodc1.Recordset.Delete
Else
'TAMBAHKAN KONDISI YANG DIINGINKAN'
End If
End Sub
Private Sub CmdHapus_Click()
PESAN = MsgBox("APAKAH ANDA YAKIN??",
vbInformation + vbYesNo, "WARNING")
If PESAN = vbYes Then
Adodc2.Recordset.Delete
Else
'TAMBAHKAN KONDISI YANG DIINGINKAN'
End If
End Sub
Private Sub Command1_Click()
Text9.Text = Val(Text10.Text)
End Sub
Private Sub Command2_Click()
Form7.Show
Unload Me
End Sub
Private Sub Command3_Click()
Form9.Show
Unload Me
End Sub
Private Sub Command7_Click()
Adodc1.Recordset.AddNew
Adodc1.Recordset!Nama_Makanan = Text1.Text
Adodc1.Recordset!Harga = Text2.Text
Adodc1.Recordset!Jumlah = Text3.Text
Adodc1.Recordset!Total = Text4.Text
Adodc1.Recordset.Update
DataGrid1.Refresh
Adodc2.Recordset.AddNew
Adodc2.Recordset!Nama_Makanan = Text5.Text
Adodc2.Recordset!Harga = Text6.Text
Adodc2.Recordset!Jumlah = Text7.Text
Adodc2.Recordset!Total = Text8.Text
Adodc2.Recordset.Update
DataGrid2.Refresh
End Sub
Komentar
Posting Komentar