【正文】
① “查找”按鈕(mand1)的click事件如下:if empty()=.f. go topa=b=alltrim()c=.f. if a=入庫編號 locate for 入庫編號=b if eof()messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) go top return else (圖) c=.t. endif endif if a=商品型號 locate for 商品型號=b if eof() messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) go top return else c=.t. endif endif if a=計量單位 locate for 計量單位=b if eof() messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) go top return else c=.t. endif endif if a=單價 b=ntom(val(alltrim())) locate for 單價=b if eof() messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) go top return else c=.t. endif endifif a=數(shù)量 b=val(alltrim()) locate for 數(shù)量=b if eof() messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) go top return else c=.t. endif endif if a=金額 b=ntom(val(alltrim())) locate for 金額=b if eof() messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) go top return else c=.t. endif endifif a=生產(chǎn)廠商 locate for 生產(chǎn)廠商=b if eof() messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) go top return else c=.t. endif endif if a=出廠日期 b=ctod(val(alltrim())) locate for 出廠日期=b if eof() messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) go top return else c=.t. endif endif if a=倉管員 locate for 倉管員=b if eof() messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) go top return else c=.t. endif endif if c =.f. go reo() =.t. =.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的事件如下:,其制作過程與入庫修改的制作過程相似。在label控件下方添加一個組合框控件Combo1及一個文本框控件Text1,文本框控件的屬性值采用默認即可,組合框控件Combo1的RowSourceType屬性值設(shè)置為“1值”,RowSource屬性值設(shè)置為“入庫編號、商品型號、計量單位、單價、數(shù)量、金額、生產(chǎn)廠商、生產(chǎn)日期和倉管員”,這樣在運行時我們可以在該組合框中選擇要查詢的字段。本表單使用的數(shù)據(jù)環(huán)境為入庫單和廠商信息表。項目具體實現(xiàn)例:入庫修改本表單用于對入庫商品的相關(guā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