【正文】
=.f. =.t. =.t. =.t. =.t. =.t. =.t. =.t. =.t. =.t. =.t. =.t. =.t. =.t. =.t. =.t. =.t. =.t. = = = = = = = = = =.f. =.t. endifelsemessagebox(請輸入要查找的內(nèi)容!,16,系統(tǒng)提示) = endif②“修改”按鈕的click的事件如下:=.f.=.f.=.f.=.f.=.f.=.f.=.f.=.f.③“取消”按鈕的click的事件如下:,其制作過程與入庫修改的制作過程相似。在命令按鈕下方添加9個label控件,將這9個label控件排成兩行,并將其caption屬性依次設(shè)置為“入庫編號”、“商品型號”和“計量單位”等等。在label控件下方添加一個組合框控件Combo1及一個文本框控件Text1,文本框控件的屬性值采用默認即可,組合框控件Combo1的RowSourceType屬性值設(shè)置為“1值”,RowSource屬性值設(shè)置為“入庫編號、商品型號、計量單位、單價、數(shù)量、金額、生產(chǎn)廠商、生產(chǎn)日期和倉管員”,這樣在運行時我們可以在該組合框中選擇要查詢的字段。向表單添加一個grid控件,.,其RecordSourceType值采用默認的“1別名”,在表單設(shè)計器中將其寬和高粗略調(diào)小一些即可,具體屬性值我們將在表單的init事件代碼中對其進行設(shè)置。本表單使用的數(shù)據(jù)環(huán)境為入庫單和廠商信息表。對相應(yīng)信息進行修改后,按按鈕修改,即可保存修改好的信息。項目具體實現(xiàn)例:入庫修改本表單用于對入庫商品的相關(guān)信息進行修改。修改處理過程:需要修改時,在組合框中選擇要查找的條件,在文本框中輸入相應(yīng)信息(輸入信息要正確,否則系統(tǒng)會出現(xiàn)錯誤提示),按按鈕查找,即下面的文本框中會出現(xiàn)所要查找的記錄的詳細信息(其中入庫編號是固定的)。對表單上各控件的位置進行適當?shù)恼{(diào)整,重點:(1)“查找”按鈕(mand1) 的click事件如下 :if empty()=.f. go topa=b=alltrim() local c as integer if a=入庫編號 Select * from 入庫單 where 入庫編號 like b +% into cursor bas sele bas c=reccount() if c1 (圖①“查詢”按鈕(mand2)的click事件如下: use messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) () return endif endif if a=商品型號 Select * from 入庫單 where 商品型號 like b +% into cursor bas sele bas c=reccount() if c1 use messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) () return endif endif if a=計量單位 Select * from 入庫單 where 計量單位 like b +% into cursor bas sele bas c=reccount() if c1use messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) () return endifendif if a=生產(chǎn)廠商 Select * from 入庫單 where 生產(chǎn)廠商 like b +% into cursor bas sele bas c=reccount() if c1 use messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) () return endif endif if a=倉管員 Select * from 入庫單 where 倉管員 like b +% into cursor bas sele bas c=reccount() if c1 use messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) () return endif endif if a=單價 b=ntom(val(alltrim())) Select * from 入庫單 where 單價 =b into cursor bas sele bas c=reccount() if c1 use messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) () return endif endifif a=金額 b=ntom(val(alltrim())) Select * from 入庫單 where 金額 =b into cursor bas sele bas c=reccount() if c1 use messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) () return endif endif if a=數(shù)量 b=val(alltrim()) Select * from 入