如下是Form init的代码
set century on
SET DATE ANSI
SET SAFETY OFF
PUBLIC cvalue
PUBLIC nmanual
PUBLIC nbatch
nmanual = 0
nbatch = 0
thisform.label2.Visible = .f.
thisform.text1.Visible = .f.
thisform.label3.Visible = .f.
thisform.text2.Visible = .f.
thisform.label5.Visible = .f.
thisform.text3.Visible = .f.
thisform.label4.Visible = .f.
thisform.text4.Visible = .f.
OPEN DATABASE inter_calculate EXCLUSIVE
USE create_po_input IN 1
SELECT 1
ZAP
USE create_po_DISPLAY IN 2
SELECT 2
ZAP
USE po_HISTORY IN 3
SELECT 3
ZAP
thisform.text1.MaxLength = 6
thisform.text2.MaxLength = 10
thisform.text3.MaxLength = 10
thisform.text4.MaxLength = 5
APPEND FROM po_record FIELDS create_date,vendor_code,vendor_name,material,qty
*SET ORDER TO
create_date
thisform.grid1.column1.header1.caption = "Date
"
thisform.grid1.column2.header1.caption = "Code
"
thisform.grid1.column3.header1.caption = "Name
"
thisform.grid1.column4.header1.caption = "Material
"
thisform.grid1.column5.header1.caption = "qty
"
thisform.grid1.autofit
thisform.grid1.FontSize = 9
thisform.grid1.RecordSourcetype = 1
thisform.grid1.RecordSource = 'po_history'
thisform.grid1.Refresh