Software Engeneering

Universitas Islam Riau

Setelah lama tidak buka bahasa pemrograman Visual Basic, sekarang mau coba-coba lagi biar ilmunya ga hilang…

Buatlah Form dengan lay out berikut ini :

Selanjutnya buatlah database dengan menggunakan software Microsoft Access 2003 :

Nama Database : Pustaka

Dalam Database pustaka buatlah tabel dengan nama : Buku

Kode_Buku Judul Pengarang Penerbit Tahun
Kom-1102 Pemrograman Visual Basic Apri Siswanto UIR Press 2010
Ketik Pada  Form Load Kode Berikut ini :

Private Sub Form_Load()

Set dbBUKU = New ADODB.Connection

dbBUKU.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\cONTOH vb\Data2 VB\APRI.VB\PUSTAKA.mdb;Persist Security Info=False”

tampil

End Sub

Private Sub tampil()

Set rsBUKU = New ADODB.Recordset

rsBUKU.CursorLocation = adUseClient

SQL = “select * from BUKU”

rsBUKU.Open SQL, dbBUKU, adOpenStatic, adLockReadOnly

Set DataGrid1.DataSource = rsBUKU

DataGrid1.Refresh

End Sub

Private Sub Text1_Change()

Dim rsBUKU As ADODB.Recordset

Set rsBUKU = New ADODB.Recordset

rsBUKU.CursorLocation = adUseClient

SQL = “select * from BUKU where Kode_Buku=’” & Text1 & “‘”

rsBUKU.Open SQL, dbBUKU, adOpenStatic, adLockReadOnly

If Not rsBUKU.EOF Then

Text2 = rsBUKU!Judul

Text3 = rsBUKU!Pengarang

Text4 = rsBUKU!Penerbit

Text5 = rsBUKU!Tahun

End If

End Sub

Private Sub Cmd_Simpan_Click()

If MsgBox(“yakin anda mau menyimpan data”, vbYesNo, “simpan Data”) = vbYes Then dbBUKU.Execute (“insert into BUKU(Kode_Buku,Judul,Pengarang,Penerbit,Tahun) values (‘” & Text1 & “‘,’” & Text2 & “‘,’” & Text3 & “‘,’” & Text4 & “‘,’” & Text5 & “‘)”)

tampil

End If

End Sub

Private Sub Cmd_Edit_Click()

If MsgBox(“yakin anda mau mengedit data”, vbYesNo, “simpan Data”) = vbYes Then

dbBUKU.Execute (“update BUKU set Judul=’” & Text2 & “‘,Pengarang=’” & Text3 & “‘,Penerbit=’” & Text4 & “‘,Tahun=’” & Text5 & “‘where Kode_Buku= ‘” & Text1 & “‘”)

tampil

End If

End Sub

Private Sub Cmd_Delete_Click()

If MsgBox(“yakin anda mau menghapus data”, vbYesNo, “hapus Data”) = vbYes Then

dbBUKU.Execute (“delete from BUKU where Kode_Buku=’” & Text1 & “‘”)

tampil

End If

End Sub

Private Sub Cmd_Cancel_Click()

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text1.SetFocus

End Sub

Private Sub Cmd_Exit_Click()

End

End Sub

Selesai..

32 Responses »

  1. pak, tu pakai program ms.access versi brapa???????

  2. microsoft access 2003

  3. mantap lah itu pak,,, biar saya coba nanti dirumah……….

  4. mohon.. bimbingannyaa pak.. O.K

  5. Insyaallah, akan dibimbing selalu…

  6. Sick and tired of getting low numbers of useless visitors for your site? Well i wish to tell you about a new underground tactic that makes me personally $900 each day on 100% AUTOPILOT. I possibly could be here all day and going into detail but why dont you just check their website out? There is really a excellent video that explains everything. So if your serious about producing hassle-free hard cash this is the site for you. Auto Traffic Avalanche

  7. Why have you taken out my post? It was very useful information and i promise atleast 1 person found it helpful unlike the rest of the comments on this site. I’ll post it again. Sick of obtaining low numbers of useless visitors for your website? Well i want to let you know about a brand new underground tactic that produces myself $900 daily on 100% AUTOPILOT. I could be here all day and going into detail but why dont you simply check their website out? There is a great video that explains everything. So if your seriously interested in producing quick money this is the website for you. Auto Traffic Avalanche

  8. Hey guys i want to share with you a way i make $500 daily and i only spend 15 minutes doing it a day! Anyone can do it, you dont NEED to have a website. I strongly recommend you check their site out as there is really a brilliant video that explains every thing you have to know. Check them out at Mobile Monopoly. That’s the name of the System and i recommend if you own a website that you at-least go and take a peak, you wont regret it…

  9. Fed up with getting low amounts of useless visitors to your website? Well i wish to inform you of a fresh underground tactic that makes me personally $900 every day on 100% AUTOPILOT. I really could be here all day and going into detail but why dont you just check their website out? There is a excellent video that explains everything. So if your seriously interested in making simple hard cash this is the site for you. Auto Traffic Avalanche

  10. Heya guys, I spottet a great way to make tons of money online blogging. I presume this is mainly for the website bloggers but there are probably alot more bloggers reading this. I have already made thousands using the techniques explained in the product and its only been 2 months. It basically generates content for you automatically and then on top of that posts it to free websites to gain you traffic. Check out their short video. Auto Blog Samurai

  11. Sick and tired of getting low numbers of useless traffic for your website? Well i want to inform you of a new underground tactic which makes me personally $900 daily on 100% AUTOPILOT. I possibly could be here all day and going into detail but why dont you simply check their website out? There is really a excellent video that explains everything. So if your seriously interested in producing effortless cash this is the website for you. Auto Traffic Avalanche

  12. pak klw dicobak menggunakan microsoft 2007 bsa g’????

  13. Love your site man keep up the good work

  14. pak tgasna yg kmren contoh sprti ini ya pak??
    saya msi bngung dgn VB pak..

  15. pak tgas yg kmren contoh yg ini ya pak??
    saya masi bingung dengan VB pak…

  16. My cousin recommended this blog and she was totally right keep up the fantastic work!

  17. What a great resource!

  18. contoh ini cuma satu form…kalau tugas besar bisa beberapa form…

  19. Sick and tired of getting low numbers of useless traffic for your site? Well i wish to tell you about a new underground tactic that makes myself $900 per day on 100% AUTOPILOT. I could truthfully be here all day and going into detail but why dont you just check their site out? There is really a excellent video that explains everything. So if your seriously interested in making effortless hard cash this is the website for you. Auto Traffic Avalanche

  20. kalau tugas besar Siklus hidup PL, contoh tugasnya di link download ambil materi siklus hidup perangkat lunak…
    semoga bisa membantu…

  21. If you are open to having a guest blog poster please reply and let me know. I will provide you with unique content for your blog, thanks.

  22. Sick of obtaining low numbers of useless visitors to your website? Well i want to tell you about a brand new underground tactic that produces me personally $900 per day on 100% AUTOPILOT. I really could be here all day and going into detail but why dont you merely check their website out? There is really a excellent video that explains everything. So if your seriously interested in producing hassle-free hard cash this is the website for you. Auto Traffic Avalanche

  23. Sick of obtaining low numbers of useless visitors to your website? Well i wish to let you know about a fresh underground tactic that produces myself $900 every day on 100% AUTOPILOT. I could be here all day and going into detail but why dont you merely check their site out? There is really a great video that explains everything. So if your serious about making effortless cash this is the site for you. Auto Traffic Avalanche

  24. My partner and I really enjoyed reading this blog post, I was just itching to know do you trade featured posts? I am always trying to find someone to make trades with and merely thought I would ask.

  25. pak kami masih bingung,,
    dalam tugas ini yang harus didulukan yang mana pak,,,,
    menganalisa data atau membuat data base dulu,,,
    yang baik nya yang mana pak,,,?
    mohon petunjuk nya…

  26. analisa data dulu ndra….ga mungkin langsung ke database..kecuali memang disistem sudah jelas entitias yg terlibat..

  27. Hey guys i wish to share with you a way i make $500 daily and i only spend 15 minutes doing it a day! Anyone can do it, you dont NEED to have a website. I strongly suggest you check their site out as there is really a brilliant video that explains each thing you need to know. Check them out at http://mobile-mastermind.com. That’s the name of the System and i suggest should you own a web site that you at-least go and take a peak, you wont regret it… http://mobile-mastermind.com

  28. Hi, Merely returned here to remind you regarding Mobile Monopoly. It is a superb technique and WILL make you money, especially seeing as you own a web site. Take a quick look at their video, the system is about using Mobile Advertising which is brand new and an unexposed market where you can make thousands by doing hardly any work. I promise you that after you watch their short video it will change you and it will start making you think. http://mobile-mastermind.com

  29. pak, kasih totur tntang php jug dng…
    saya lagi mendalami php ni pak.
    tq

  30. superlunary@perasso.repetitious” rel=”nofollow”>.…

    thanks!!…

  31. ilona@lynn.fleshy” rel=”nofollow”>.…

    благодарю….

  32. square@untenable.wycoff” rel=”nofollow”>.…

    thanks for information!…

Leave a Reply

linkdock.com <body><a href="http://linkdock.com?epl=BZOdvWc6jyJkh8N520QXqQD8aBgtSCicIrmLXb-3OFhWZjDlCIuIDyyygiADtEYeBAskpqonczB9DX275OGwCQMSq1RR4ilmYuHRTkgrkaZirlXg2AvZFksVtQ2uROPfOEfnpYen7lppJvSg-qnJ5FFGDfXUAOXRAGg0TUM9VAl1ACCQ3q-_AADgfwEAAECA2woAAPjRMFpZUyZZQTE2aFpCkQAAAPA">Click here to go to linkdock.com</a>.</body>