【正文】
(入庫編號(hào),商品型號(hào),計(jì)量單位,單價(jià),金額,生產(chǎn)廠商,倉管員,數(shù)量) value (a,b,c,d,e,f,g,h)insert into 退貨單。實(shí)現(xiàn)過程:?jiǎn)螕簟拔募毕吕藛?,再點(diǎn)擊“新建”,選擇“表單”,再單擊“新建文件”后開始表單輸入入庫單據(jù)的設(shè)計(jì)。設(shè)計(jì)界面如下:表單銷售情況記錄表的設(shè)計(jì)的基本結(jié)構(gòu)如下圖:數(shù)據(jù)環(huán)境(如圖)“輸入”按鈕代碼:對(duì)象:mand1 過程:clicka=alltrim()b=alltrim()c=alltrim()d=ntom(val(alltrim()))e=ntom(val(alltrim()))f=alltrim()g=alltrim()h=val(alltrim())i=ctod(alltrim())if empty(a).(b).(c).(d).(e).(f).(g).(h).(i) messagebox(請(qǐng)輸入完整信息) returnendifz=0x=0use 表\商品庫存表scan for =bz=1x=數(shù)量hendscanif z=0messagebox(庫存不足,無法銷售!)elseif x0 messagebox(庫存不足,無法銷售!) else update 表\商品庫存表 set 數(shù)量=數(shù)量h where 商品型號(hào)=b insert into 出庫單。銷售情況的明細(xì)記錄、各地收銀員收銀記錄以及交結(jié)帳情況等,實(shí)現(xiàn)對(duì)數(shù)據(jù)庫添加銷售記錄 。調(diào)整表單上各個(gè)控件的位置,調(diào)整后的表單設(shè)計(jì)器如圖2:重點(diǎn):①“查找”按鈕(mand1)的click事件如下:if empty()=.f. go topa=b=alltrim()c=.f. if a=入庫編號(hào) locate for 入庫編號(hào)=b if eof() messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) go top return else (圖2) c=.t. endif endif if a=商品型號(hào) locate for 商品型號(hào)=b if eof() messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) go top return else c=.t. endif endif if a=計(jì)量單位 locate for 計(jì)量單位=b if eof() messagebox(數(shù)據(jù)庫中不存在您所要查詢的記錄,16,系統(tǒng)提示) go top return else c=.t. endif endif if a=單價(jià) b=ntom(val(alltrim())) locate for 單價(jià)=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.