9. Penulis mengasumsikan bahwa para pembaca sudah memahami bagaimana proses pembuatan tabel,
penggunaan object pada form.
Berikut kodenya :
Object Form1 Procedure Init
1
2 SET TALK OFF
3 SET DELETE on
4 SET EXCLUSIVE on
5 SET EXACT ON
IF !USED("tblhargabarang")
6 SELECT 1
7 USE tblhargabarang EXCLUSIVE
8 ENDIF
9 thisform.txtkodeb.Value =''
10 thisform.txtnamab.Value =''
thisform.txthargab.Value =0
11 thisform.txtnamab.Enabled = .F.
12 thisform.txthargab.Enabled = .F.
13 thisform.cmdsimpan.Enabled = .F.
14 thisform.cmdedit.Enabled = .F.
thisform.cmdhapus.Enabled = .F.
15
thisform.txtkodeb.SetFocus
16
17
Object Form1 procedure Load
1 PUBLIC baru
2 baru =0