Membuat aplikasi untuk penyimpanan dan penampilan menu masakan menggunakan VB
untuk program ini Visual basic di sinkronkan dengan applikasi pembuat data base seperti acces
Tampilan screenshot dan kodingnya pada program ini
Home menu
Private Sub mexit_Click()
End
End Sub
----------------------------------------------
Private Sub mjenis_Click()
Form2.Show
End Sub
----------------------------------------------
Private Sub mkanan_Click()
Form1.Show
End Sub
----------------------------------------------
Private Sub mtambah_Click()
Form3.Show
End Sub
Form 1
Private Sub Next_Click()
MDIForm1.Show
End Sub
----------------------------------------------------------------
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
Adodc1.Recordset!Jenis_Masakan = Tjenis.Text
Adodc1.Recordset!Nama_Masakan = Tnama.Text
Adodc1.Recordset!Bahan = Tbahan.Text
Adodc1.Recordset!Cara_memasak = Tcara.Text
Adodc1.Recordset.Update
MsgBox "Data Sudah Di Simpan!"
End Sub
-----------------------------------------------------------------
Private Sub Form_Load()
Adodc1.RecordSource = "select*from resep"
Adodc1.Refresh
End Sub
dan ini hasil dari penyimpanan di data base
Form 2
Private Sub btTampil_Click()
Adodc1.RecordSource = "select * from resep where Jenis_Masakan = '" & Tjenis.Text & "'"
Adodc1.Refresh
baris = 1
While Not Adodc1.Recordset.EOF
fg1.Row = baris
fg1.Col = 0
fg1_text = baris
fg1.Col = 1
fg1.Text = Adodc1.Recordset!Nama_Masakan
Adodc1.Recordset.MoveNext
baris = baris + 1
Wend
End Sub
-----------------------------------------------------------------
Private Sub fg1_Click()
fg1.ColWidth(0) = 1500
fg1.ColWidth(1) = 1500
End Sub
-----------------------------------------------------------------
Private Sub Form_Load()
fg1.Row = 0
fg1.Col = 0
fg1.Col = 1
fg1.Text = "NamaMakanan"
End Sub
Form 3
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
Adodc1.Recordset!Jenis_Masakan = Tjenis.Text
Adodc1.Recordset.Update
MsgBox "Data Masakan Sudah Di Simpan!"
End Sub
----------------------------------------------------------------
Private Sub Command2_Click()
MDIForm1.Show
End Sub
-----------------------------------------------------------------
Private Sub Form_Load()
Adodc1.RecordSource = "select * From resep"
Adodc1.Refresh
End Sub
tampilan penambahan jenis makanan pada data base
0 komentar:
Posting Komentar