Wednesday, February 19, 2014

Cari Kuadrat ala Sang Bocah

Private Sub Form_Load()CmdPassword.Caption = "Edit Data" 'Posisi caption tombol pertama kaliMe.AllowEdits = False 'Form tidak dapat di editEnd SubPrivate Sub CmdPassword_Click()Dim Password As StringPassword = "user" ' Isi variable passwordIf CmdPassword.Caption = "Hasil" Then 'Menguji caption tombol   Me.AllowEdits = False   CmdPassword.Caption = "Edit Data" 'Mengembalikan caption semula   TxtHasilKuadrat = Val(TxtKuadrat...

Wednesday, February 12, 2014

Kalkulator ala Sang Bocah

Private Sub CmdBagi_Click() Bil1 = Val(TxtBil1) Bil2 = Val(TxtBil2) Hasil = Bil1 / Bil2 TxtHasil = Hasil End Sub Private Sub CmdHapus_Click() TxtBil1 = "" TxtBil2 = "" TxtHasil = "" TxtBil1.SetFocus End Sub Private Sub CmdKali_Click() Bil1 = Val(TxtBil1) Bil2 = Val(TxtBil2) Hasil = Bil1 * Bil2 TxtHasil = Hasil End Sub Private Sub CmdKeluar_Click() DoCmd.Save DoCmd.Close End Sub Private Sub CmdKurang_Click() Bil1 = Val(TxtBil1) Bil2 = Val(TxtBil2) Hasil...