Kamis, 02 Juli 2020

BERBAGI ILMU: Contoh Perintah "COMMAND" dalam PROGRAM DATABASE MS. VISUAL FOXPRO 9.0


Contoh Perintah2 Program Database VISUAL FOXPRO 9.0

1.  Perintah COMMAND SIMPAN/SAVE

IF THISFORM.COMmand1.Caption="SIMPAN"
      THISFORM.COMmand1.Caption="TAMBAH"
      THISFORM.hidup
      THISFORM.TExt1.SetFocus
      ELSE
      APPEND BLANK
            REPLACE Bulan WITH THISFORM.TExt1.Value
            REPLACE No WITH THISFORM.TExt2.Value
            REPLACE Namabrg WITH THISFORM.TExt3.Value
            REPLACE Qty WITH THISFORM.text4.Value
            REPLACE Hargabeli WITH THISFORM.text5.Value
            REPLACE Totalbeli WITH THISFORM.text6.Value
            REPLACE Hargajual WITH THISFORM.text7.Value
            REPLACE Totaljual WITH THISFORM.TExt8.Value
            REPLACE Laba WITH THISFORM.TExt9.Value
            REPLACE Keterangan WITH THISFORM.Combo1.Value
            SKIP 0
            thisform.Refresh
            THISFORM.COMmand1.Caption="SIMPAN"
            thisform.mati
enDIF

2.  Perintah COMMAND NEXT/MAJU

IF !EOF()
      SKIP
      thisform.tampilkan_data
      ELSE
      MESSAGEBOX("Data sudah habis")
Endif

3.  Perintah COMMAND BACK/MUNDUR

IF !BOF()
      SKIP -1
      thisform.tampilkan_data
      ELSE
      MESSAGEBOX("Data sudah habis")
Endif

4.  Perintah COMMAND EDIT/UBAH

IF THISFORM.COMmand5.Caption="UBAH"
      THISFORM.COMmand5.Caption="SIMPAN"
      THISFORM.hidup
      THISFORM.TExt1.SetFocus
      ELSE
      APPEND BLANK
            REPLACE Bulan WITH THISFORM.TExt1.Value
            REPLACE No WITH THISFORM.TExt2.Value
            REPLACE Namabrg WITH THISFORM.TExt3.Value
            REPLACE Qty WITH THISFORM.text4.Value
            REPLACE Hargabeli WITH THISFORM.text5.Value
            REPLACE Totalbeli WITH THISFORM.text6.Value
            REPLACE Hargajual WITH THISFORM.text7.Value
            REPLACE Totaljual WITH THISFORM.TExt8.Value
            REPLACE Laba WITH THISFORM.TExt9.Value
            REPLACE Keterangan WITH THISFORM.Combo1.Value
            SKIP 0
            thisform.Refresh
            THISFORM.COMmand5.Caption="UBAH"
            thisform.mati
ENDIF

5.  Perintah COMMAND DELETE/HAPUS

IF !EOF()
      DELETE
      SKIP
      THISFORM.Tampilkan_data
      ELSE
      MESSAGEBOX("DATA SUDAH HABIS")
ENDIF

6.  Perintah COMMAND VIEW/TAMPILKAN
Browse

7.  Perintah COMMAND PRINT/CETAK
REPORT FORM penjualan2020.preview

8.  Perintah COMMAND EXIT/Keluar
Thisform.release


By: Fanni

Tidak ada komentar:

Posting Komentar

🔖 *BERBUAT BAIKLAH KEPADA ORANG-ORANG YANG LEMAH*

🔹 Dalam sebuah hadits yang shohih, Rosululloh shollallohu ‘alaihi wa sallam pernah bersabda : أَبْغُوْنِي الضُّعَفَاءَ،  فَإِنَّمَا  تُرْزَ...