




版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、倉(cāng)庫(kù)管理系統(tǒng)項(xiàng)目的建立這是本人利用閑暇之余在 VB6.0上制作的一個(gè)簡(jiǎn)陋的類(lèi)庫(kù)管系統(tǒng),現(xiàn)圖文結(jié)合的方式一步一步展現(xiàn) 制作過(guò)程。由于本人是個(gè)初學(xué)者,里面存在很多不足之處望得到高手們的指導(dǎo)。 此文可作供初學(xué)者 們學(xué)習(xí)交流。作者聯(lián)系方式:E-mail最終運(yùn)行效果打開(kāi)軟件出現(xiàn)如下登錄界面輸入系統(tǒng)預(yù)設(shè)用戶(hù)名及密碼(11)單擊“登錄”或單擊“新用戶(hù)”添加新用戶(hù)進(jìn)入如下主界面:建立工程1、創(chuàng)建標(biāo)準(zhǔn)EXE2、按“打開(kāi)”3、添加MDI窗體打開(kāi)4、編輯菜單在空白處右擊一一點(diǎn)擊“菜單編輯器”在“標(biāo)題”里輸入“系統(tǒng)”,在“名稱(chēng)”里輸入“SyS(注意此處不能為漢字)點(diǎn)擊“下一個(gè)”再點(diǎn)擊“確定”退到MDI界面點(diǎn)擊“系統(tǒng)”
2、一一“退出”如下,然后編寫(xiě)代碼。 代碼如下:PrivateSubExit_Click()EndEndSub數(shù)據(jù)庫(kù)的建立VB6.0中可以創(chuàng)建Access數(shù)據(jù)庫(kù)。如下建立一個(gè)“用戶(hù)表”的數(shù)據(jù)庫(kù),用來(lái)存放用戶(hù)信息及一 些出入庫(kù)管理信息。如下圖單擊“外接程序”再單擊“可視化數(shù)據(jù)管理器”出現(xiàn)如圖點(diǎn)擊“文件”“新建”“ MicrosoftAccess”“Version2.0MDB輸入數(shù)據(jù)庫(kù)名,“保存”出現(xiàn)如下圖在數(shù)據(jù)窗口中右擊一一“新建表”,最終如下往數(shù)據(jù)表里添加數(shù)據(jù)在這里就不羅嗦了,請(qǐng)查閱相關(guān)書(shū)籍。登錄界面窗口的建立最終界面如下:1、Adodc1的添加過(guò)程為:?jiǎn)螕簟肮こ獭币灰弧安考背霈F(xiàn)下圖所示,選擇“
3、控件”下的“MicrosoftADODataControl6.0( OLEDB ”單擊“確定”在工具欄中會(huì)出現(xiàn)/ ”圖標(biāo),單擊它并拖動(dòng)到相應(yīng)位置即可。其它元件不在說(shuō)明。2、 本窗體代碼如下:PrivateSubCommand1_Click()“登錄”、“確定”按鈕lfCommand1.Caption=確定AndCommand2.Caption=取消Then如果為“確定”則添加新用戶(hù)lfText1.Text=Then提示用戶(hù)輸入用戶(hù)名MsgBox請(qǐng)輸入用戶(hù)名!,登錄信息提示:ExitSubElseDimusenameAsString檢測(cè)用戶(hù)名是否已經(jīng)存在DimstrSAsStringusenam
4、e=Trim(Text1.Text)strS=select*from用戶(hù)登錄信息表 where 用戶(hù)名=&usename&山Adodc1.CommandType=adCmdTextAdodc1.RecordSource=strSAdodc1.RefreshMsgBox您輸入的用戶(hù)已存在!,登錄提示信息:Text1.Text=Text2.Text=Text3.Text=Text1.SetFocusExitSubEndIfEndIfIext2.Text=Then提示用戶(hù)密碼不能為空MsgBox密碼不能為空!,登錄提示信息:Text2.SetFocusExitSubEndIflfText3.Text
5、=ThenMsgBox請(qǐng)?jiān)俅屋斎朊艽a!,登錄提示信息:Text3.SetFocusExitSubEndIflfText2.TextText3.TextThenMsgBox兩次輸入的密碼不一致,請(qǐng)確認(rèn)!,登錄提示信息:Text2.Text=Text3.Text=Text2.SetFocusExitSubElseMsgBox(添加新用戶(hù)成功,現(xiàn)在您可以登陸系統(tǒng)了!)Label3.Visible=FalseText3.Visible=FalseCommand1.Caption=登錄Command2.Caption=退出EndIfElse “登錄”按鈕,用戶(hù)登錄DimstrSnoAsStringDim
6、strSelectAsString strSno=Trim(Text1.Text) 檢測(cè)用戶(hù)名是否存在 strSelect=select 密碼 from 用戶(hù)登錄信息表 where 用戶(hù)名 =&strSno& Adodc1.CommandType=adCmdTextAdodc1.RecordSource=strSelectAdodc1.RefreshMsgBox用戶(hù)名不存在,請(qǐng)重新輸入!,登錄提示信息:Text1.Text=Text2.Text=Text1.SetFocusExitSubEndIfForm1.Hide UnloadMeForm2.ShowMsgBox登陸成功!,登錄提示信息:E
7、lseMsgBox密碼不正確,請(qǐng)重新輸入!,登錄提示信息:Text2.Text=Text2.SetFocusEndIfEndIfEndSubPrivateSubCommand2_Click() “退出”或“取消”按鈕IfCommand2.Caption= 取消 ThenLabel3.Visible=FalseText3.Visible=FalseCommand1.Caption=登錄“Command2.Caption=退出“Text1.Text=Text2.Text=Text1.SetFocusElseEndUnloadMeEndIfEndSubPrivateSubCommand3_Click
8、() “新用戶(hù)”按鈕Label3.Visible=TrueText3.Visible=TrueText1.Text=Text2.Text=Text3.Text=Command1.Caption=確定“Command2.Caption=取消“Text1.SetFocusEndSubPrivateSubCommand3_MouseDown(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)Label6.Visible=TrueEndSubPrivateSubCommand3_MouseUp(ButtonAsInteger,ShiftAsInteg
9、er,XAsSingle,YAsSingle)Label6.Visible=FalseEndSubPrivateSubForm_Load()Label3.Visible=FalseText3.Visible=FalseEndSubPrivateSubTimer1_Timer() 時(shí)間 time1 控件的 time 事件代碼,用來(lái) 顯示向左移動(dòng)的歡迎字幕IfLabel4.Left+Label4.Width0Then 當(dāng)標(biāo)簽右邊位置大于 0 時(shí),標(biāo)簽向左移Label4.MoveLabel4.Left-80Else 否則標(biāo)簽從頭開(kāi)始Label4.Left=Form1.ScaleWidthEndIfI
10、fLabel5.Left+Label5.Width0ThenLabel5.MoveLabel5.Left-80ElseLabel5.Left=Form1.ScaleWidthEndIfEndSub如下:代碼:PrivateSubAddNew_Click()Frame1.Visible=TrueFrame2.Visible=FalseEndSubPrivateSubCHKPMCHX_Click()Frame2.Caption= 出庫(kù)信息 DimpmAsStringDimnAsStringpm=InputBox( 產(chǎn)品名 , 請(qǐng)輸入 ,0) n=select*from 出庫(kù)表 where 品名 =
11、&pm& Adodc2.CommandType=adCmdText Adodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubCHKXHCHX_Click()Frame2.Caption= 出庫(kù)信息 DimXHAsStringDimnAsStringXH=InputBox( 產(chǎn)品型號(hào) , 請(qǐng)輸入 ,0)n=select*from 出庫(kù)表 where 型號(hào) =&XH& Adodc2.CommandType=adCmdText Adodc2.RecordSource=nAdodc2.RefreshEndSubPrivateSub
12、CKCZ_Click()Form2.HideForm6.ShowEndSubPrivateSubCKJSHR_Click()Frame2.Caption= 出庫(kù)信息 DimJSHRAsStringDimnAsStringJSHR=InputBox( 經(jīng)手人 , 請(qǐng)輸入 ,0) n=select*from 出庫(kù)表 where 經(jīng)手人 =&JSHR& Adodc2.CommandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubCKSHJ_Click()Frame2.Caption= 出庫(kù)信息
13、 DimCHKRQAsStringDimnAsStringCHKRQ=lnputBox(出庫(kù)日期,格式為:月/日/年如:12/1/2011, 請(qǐng)輸入,0) n=select*from 出庫(kù)表where出庫(kù)日期三&CHKRQ&吶Adodc2.CommandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCalllnitGrid1EndSubPrivateSubCKZCX_Click()Frame2.Caption= 出庫(kù)信息 DimZBAsStringZB=select*from 出庫(kù)表 Adodc2.CommandType=adCmdTextA
14、dodc2.RecordSource=ZBAdodc2.RefreshCalllnitGrid1EndSubPrivateSubCommand1_Click() lfText1.Text=Then 提示用戶(hù)輸入用戶(hù)名MsgBox請(qǐng)輸入用戶(hù)名!,登錄信息提示:ExitSubElseDimusenameAsString 檢測(cè)用戶(hù)名是否已經(jīng)存在DimstrSAsString usename=Trim(Text1.Text)strS=select*from 用戶(hù)登錄信息表 where 用戶(hù)名 =&usename&Adodc1.CommandType=adCmdTextAdodc1.RecordSour
15、ce=strSAdodc1.RefreshMsgBox您輸入的用戶(hù)已存在!,登錄提示信息:Text1.Text=Text2.Text=Text3.Text=Text1.SetFocusExitSubEndIfEndIfIfText2.Text=Then 提示用戶(hù)密碼不能為空MsgBox密碼不能為空!,登錄提示信息:Text2.SetFocusExitSubEndIfIfText3.Text=ThenMsgBox請(qǐng)?jiān)俅屋斎朊艽a!,登錄提示信息:Text3.SetFocusExitSubEndIfIfText2.TextText3.TextThenMsgBox兩次輸入的密碼不一致,請(qǐng)確認(rèn)!,登錄提
16、示信息:Text2.Text=Text3.Text=Text2.SetFocusExitSubElsee提示信息 !)DimXAsIntegerX=MsgBox(成功添加新用戶(hù),是否要重新登錄!“,vbYesNo+vbQuestion+vbDefaultButton1,“IfX=vbYesThenUnloadMeForm3.ShowEndIfMsgBox( 成功添加新用戶(hù)! )Label3.Visible=FalseText3.Visible=FalseCommand1.Caption= 登錄Command2.Caption= 退出EndIfFrame1.Visible=FalseFrame2
17、.Visible=TrueText1.Text=Text2.Text=Text3.Text=Form3.ShowEndSubPrivateSubCommand2_Click()Frame1.Visible=FalseFrame2.Visible=TrueEndSubPrivateSubCXDL_Click()Form3.ShowUnloadMeEndSubPrivateSubExit_Click()EndUnloadForm1UnloadForm2UnloadForm3UnloadForm4UnloadForm5UnloadForm6UnloadForm7UnloadForm8EndSubPr
18、ivateSubForm_Load()UnloadForm1Frame1.Visible=FalseCallInitGrid0Me.Height=MDIForm1.Height-1060Me.Width=MDIForm1.Width-560Me.Top=MDIForm1.TopMe.Left=MDIForm1.LeftEndSubPrivateSubGHCZ_Click()Form2.HideForm8.ShowEndSubPrivateSubGHPMCX_Click()Frame2.Caption= 歸還信息 DimpmAsStringDimnAsStringpm=InputBox( 產(chǎn)品名
19、 , 請(qǐng)輸入 ,0) n=select*from 歸還表 where 品名 =&pm& Adodc2.CommandType=adCmdText Adodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubGHRCX_Click()Frame2.Caption= 歸還信息 DimJCRAsStringDimnAsStringJCR=InputBox( 歸還人 , 請(qǐng)輸入 ,0) n=select*from 歸還表 where 歸還人 =&JCR&Adodc2.CommandType=adCmdTextAdodc2.Record
20、Source=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubGHSJCX_Click()Frame2.Caption= 歸還信息 DimJCRQAsStringDimnAsStringJCRQ=InputBox(歸還日期,格式為:月/ 日/年如:12/1/2011,請(qǐng)輸入,0) n=select*from 歸還表 where 歸還日期=&JCRQ&Adodc2.CommandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubGHXHCX_Click
21、()Frame2.Caption= 歸還信息 DimXHAsStringDimnAsStringXH=InputBox( 產(chǎn)品型號(hào) , 請(qǐng)輸入,0)n=select*from 歸還表 where 型號(hào)=&XH&Adodc2.CommandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubGHZCX_Click()Frame2.Caption= 歸還信息 DimZBAsStringZB=select*from 歸還表 Adodc2.CommandType=adCmdTextAdodc2.Re
22、cordSource=ZBAdodc2.RefreshCallInitGrid2EndSubPrivateSubJCCZ_Click()Form2.HideForm7.ShowEndSubPrivateSubJCHPMCHX_Click()Frame2.Caption= 借出信息 DimpmAsStringDimnAsStringpm=InputBox( 產(chǎn)品名 , 請(qǐng)輸入,0)n=select*from 借出表 where 品名=&pm&山Adodc2.CommandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2E
23、ndSubPrivateSubJCHXHCHX_Click()Frame2.Caption= 借出信息 DimXHAsStringDimnAsStringXH=InputBox( 產(chǎn)品型號(hào) , 請(qǐng)輸入 ,0) n=select*from 借出表 where 型號(hào) =&XH& Adodc2.CommandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubJCRCX_Click()Frame2.Caption= 借出信息 DimJCRAsStringDimnAsStringJCR=InputB
24、ox( 借出人 , 請(qǐng)輸入 ,0) n=select*from 借出表 where 借出人 =&JCR& Adodc2.CommandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubJCSHJCX_Click()Frame2.Caption= 借出信息 DimJCRQAsStringDimnAsStringJCRQ=InputBox(借出日期,格式為:月/ 日/年如:12/1/2011,請(qǐng)輸入,0) n=select*from 借出表 where 借出日期=&JCRQ&Adodc2.Co
25、mmandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubJCZCX_Click()Frame2.Caption= 借出信息 DimZBAsStringZB=select*from 借出表 Adodc2.CommandType=adCmdTextAdodc2.RecordSource=ZBAdodc2.RefreshCallInitGrid2EndSubPrivateSubJSHRCHX_Click()Frame2.Caption= 歸還信息 DimJSHRAsStringDimnAsS
26、tringJSHR=InputBox( 經(jīng)手人 , 請(qǐng)輸入 ,0) n=select*from 歸還表 where 經(jīng)手人 =&JSHR& Adodc2.CommandType=adCmdText Adodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubJSHRCX_Click()Frame2.Caption= 借出信息 DimJSHRAsStringDimnAsStringJSHR=InputBox( 經(jīng)手人 , 請(qǐng)輸入 ,0) n=select*from 借出表 where 經(jīng)手人 =&JSHR& Adodc2.Com
27、mandType=adCmdText Adodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubPMCX_Click()Frame2.Caption= 庫(kù)存信息 DimpmAsStringDimnAsStringpm=InputBox( 產(chǎn)品名 , 請(qǐng)輸入 ,0) n=select*from 庫(kù)存表 where 品名 =&pm& Adodc2.CommandType=adCmdText Adodc2.RecordSource=nAdodc2.RefreshCallInitGrid0EndSubPrivateSubRKCZ_C
28、lick()Form2.HideForm5.ShowEndSubPrivateSubRKJSHR_Click()Frame2.Caption= 入庫(kù)信息 DimJSHRAsStringDimnAsStringJSHR=InputBox( 經(jīng)手人 , 請(qǐng)輸入 ,0) n=select*from 入庫(kù)表 where 經(jīng)手人 =&JSHR& Adodc2.CommandType=adCmdText Adodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubRKPMCHX_Click()Frame2.Caption= 入庫(kù)信息 Di
29、mpmAsStringDimnAsString pm=InputBox( 產(chǎn)品名 , 請(qǐng)輸入 ,0)IfLen(pm)0Then n=select*from 入庫(kù)表 where 品名 =&pm& Adodc2.CommandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshEndIfCallInitGrid1EndSubPrivateSubRKSHJ_Click()Frame2.Caption= 入庫(kù)信息 DimRKRQAsStringDimnAsStringRKRQ=lnputBox(入庫(kù)日期,格式為:月/ 日/年如:12/1/2011,請(qǐng)輸入
30、,0) n=select*from 入庫(kù)表 where 入庫(kù)日期 =&RKRQ&Adodc2.CommandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCalllnitGrid1EndSubPrivateSubRKXHCHX_Click()Frame2.Caption= 入庫(kù)信息 DimXHAsStringDimnAsStringXH=lnputBox( 產(chǎn)品型號(hào) , 請(qǐng)輸入,0)lfLen(XH)0Thenn=select*from 入庫(kù)表 where 型號(hào)=&XH&Adodc2.CommandType=adCmdTextAdodc2.R
31、ecordSource=nAdodc2.RefreshEndlfCalllnitGrid1EndSubPrivateSubRKZCX_Click()Frame2.Caption= 入庫(kù)信息 DimZBAsStringZB=select*from 入庫(kù)表 Adodc2.CommandType=adCmdTextAdodc2.RecordSource=ZBAdodc2.RefreshCalllnitGrid1EndSubPrivateSubTimer1_Timer()lfLabel4.Left+Label4.Width0Then 當(dāng)標(biāo)簽右邊位置大于 0 時(shí),標(biāo)簽向左移 Label4.MoveLab
32、el4.Left-80Else 否則標(biāo)簽從頭開(kāi)始Label4.Left=Form2.ScaleWidthEndIfIfLabel5.Left+Label5.Width0ThenLabel5.MoveLabel5.Left-80ElseLabel5.Left=Form2.ScaleWidthEndIfIfLabel6.Left+Label6.Width0ThenLabel6.MoveLabel6.Left-80ElseLabel6.Left=Form2.ScaleWidthEndIfIfLabel7.Left+Label7.Width0ThenLabel7.MoveLabel7.Left-80E
33、lseLabel7.Left=Form2.ScaleWidthEndIfEndSubPrivateSubXGMM_Click()Form2.HideForm4.ShowEndSubPrivateSubXHCX_Click()Frame2.Caption= 庫(kù)存信息 DimXHAsStringDimnAsStringXH=InputBox( 產(chǎn)品型號(hào) , 請(qǐng)輸入 ,0)IfLen(XH)0ThenAndVal(XH)0 n=select*from 庫(kù)存表 where 型號(hào) =&XH& Adodc2.CommandType=adCmdText Adodc2.RecordSource=nAdodc2
34、.RefreshEndIfCallInitGrid0EndSubPrivateSubZB_Click()Frame2.Caption= 庫(kù)存信息 DimZBAsStringDimNAsStringPM=InputBox( 產(chǎn)品名 , 請(qǐng)輸入 ,0) ZB=select*from 庫(kù)存表 where 品名 =&PM& Adodc2.CommandType=adCmdText Adodc2.RecordSource=ZBAdodc2.RefreshCallInitGrid0EndSubPrivateSubInitGrid0()WithDataGrid1.Columns(0).Width=1600.
35、Columns(1).Width=2200.Columns(2).Width=2200.Columns(3).Width=1000.Columns(4).Width=1000.Columns(5).Width=4000EndWithEndSubPrivateSubInitGrid1()WithDataGrid1.Columns(0).Width=800.Columns(1).Width=1600.Columns(2).Width=1600.Columns(3).Width=800.Columns(4).Width=800.Columns(5).Width=1000.Columns(6).Wid
36、th=800.Columns(7).Width=4000EndWithEndSubPrivateSubInitGrid2()WithDataGrid1.Columns(0).Caption= 學(xué)號(hào) .Columns(1).Caption= 課程名 .Columns(2).Caption= 學(xué)分 .Columns(3).Caption= 成績(jī) 設(shè)置 DtgCond 的列寬.Columns(0).Width=800.Columns(1).Width=1600.Columns(2).Width=1600.Columns(3).Width=800.Columns(4).Width=800.Column
37、s(5).Width=800.Columns(6).Width=1000.Columns(7).Width=800.Columns(8).Width=4000EndWithEndSub用戶(hù)重新登錄界面代碼:PrivateSubCommand1_Click()DimstrSnoAsStringDimstrSelectAsString strSno=Trim(Text1.Text) 檢測(cè)用戶(hù)名是否存在 strSelect=select 密碼 from 用戶(hù)登錄信息表 where 用戶(hù)名 =&strSno& Adodc1.CommandType=adCmdTextAdodc1.RecordSourc
38、e=strSelectAdodc1.RefreshMsgBox用戶(hù)名不存在,請(qǐng)重新輸入!,登錄提示信息:Text1.Text=Text2.Text=Text1.SetFocusExitSubEndIfUnloadMeForm2.ShowMsgBox登陸成功!,登錄提示信息:ElseMsgBox密碼不正確,請(qǐng)重新輸入!,登錄提示信息:Text2.Text=Text2.SetFocusEndIfEndSubPrivateSubCommand2_Click()UnloadMeForm2.ShowEndSub修改用戶(hù)密碼界面代碼:PrivateSubCommand1_Click() IfTrim(Te
39、xt1.Text)Form2.TextUserNameThenMsgBox用戶(hù)名不正確,請(qǐng)確認(rèn)!,信息提示!Text1.Text=Text1.SetFocusExitSubElseDimnameAsStringDimnamesAsStringname=Trim(Text1.Text)names=select*from 用戶(hù)登錄信息表 where 用戶(hù)名 =&name& Adodc1.CommandType=adCmdTextAdodc1.RecordSource=namesAdodc1.RefreshIfText2.Text=ThenMsgBox請(qǐng)輸入舊密碼!,信息提示!Text2.SetFo
40、cusExitSubEndIfMsgBox舊密碼不正確,請(qǐng)確認(rèn)!,信息提示!Text2.Text=Text2.SetFocusExitSubEndIfIfText3.Text=ThenMsgBox請(qǐng)輸入新密碼!,信息提示!Text3.SetFocusExitSubEndIfIfText4.Text=ThenMsgBox請(qǐng)?jiān)俅屋斎胄旅艽a!,信息提示!Text4.SetFocusExitSubEndIfIfTrim(Text3.Text)Trim(Text4.Text)ThenMsgBox兩次輸入的新密碼不一致!,信息提示!Text3.Text=Text4.Text=Text3.SetFocusE
41、xitSubElseMsgBox(密碼修改成功!)UnloadMeForm2.ShowEndIfEndIfEndSubPrivateSubCommand2_Click()UnloadMeForm2.ShowEndSub代碼:PrivateSubCommand1_Click()IfText1.Text=AndText2.Text=ThenMsgBox “品名”和“型號(hào)”不能同時(shí)為空,必須輸入其中一項(xiàng)!,提示信息!ExitSubText1.SetFocusElseIfText3.Text=AndText4.Text=ThenMsgBox請(qǐng)輸入產(chǎn)品“數(shù)量”或“單位”之一!,提示信息!Text3.Se
42、tFocusExitSubEndIfIfText5.Text=ThenMsgBox請(qǐng)經(jīng)手人簽名!,vbCritical,提示信息!Text5.SetFocusExitSubEndIfAdodc1.RefreshEndIfDimpmAsStringDimpmsAsStringDimnAsStringDimmAsString pm=Trim(Text1.Text) n=Val(Text3.Text) pms=select*from 庫(kù)存表 where 品名 =&pm&WithForm2EndWithElseEndIfEndIf提示信息 !)DimXAsIntegerX=MsgBox(產(chǎn)品入庫(kù)登記成
43、功,是否繼續(xù)添加產(chǎn)品!,vbYesNo+vbQuestion+vbDefaultButton1,IfX=vbNoThenUnloadMeForm2.ShowElseText1.Text=Text2.Text=Text3.Text=Text4.Text=Text5.Text=Text6.Text=Text7.Text=Text1.SetFocusEndIfDimZBAsStringZB=select*from 入庫(kù)表where 品名=&PM&吶EndSubPrivateSubCommand2_Click()Text1.Text=Text2.Text=Text3.Text=Text4.Text=T
44、ext5.Text=Text6.Text=Text7.Text=Text1.SetFocusEndSubPrivateSubCommand3_Click()UnloadMeForm2.ShowEndSub出庫(kù)管理代碼:PrivateSubCommand1_Click()IfCombo1.Text=AndCombo2.Text=Thentext1.Text=AndText2.Text=ThenMsgBox “品名”和“型號(hào)”不能同時(shí)為空,必須輸入其中一項(xiàng)!,提示信息!ExitSubElseIfText1.Text=AndCombo3.Text=ThenText4.Text=ThenMsgBox請(qǐng)
45、輸入產(chǎn)品“數(shù)量”或“單位”之一!,提示信息!Text2.SetFocusExitSubEndIfIfText2.Text=ThenMsgBox請(qǐng)經(jīng)手人簽名!,vbCritical,提示信息!Text2.SetFocusExitSubEndIfAdodc1.RefreshEndIfDimpmAsStringDimpmsAsStringDimnAsStringDimmAsStringpm=Trim(Combo1.Text)n=Val(Text1.Text)pms=select*from 庫(kù)存表 where 品名=&pm&山EndIf提示信息 !)DimXAsIntegerX=MsgBox(產(chǎn)品出庫(kù)
46、登記成功,是否繼續(xù)添加產(chǎn)品!,vbYesNo+vbQuestion+vbDefaultButton1,IfX=vbNoThenUnloadMeForm2.ShowEndIfCombo1.Text=Combo2.Text=Combo3.Text=Text1.Text=Text2.Text=Text3.Text=Text4.Text=DimZBAsStringZB=select*from 出庫(kù)表where 品名=&PM&何EndSubPrivateSubCommand2_Click()Combo1.Text=Combo2.Text=Combo3.Text=Text1.Text=Text2.Text
47、=Text3.Text=Text4.Text=EndSubPrivateSubCommand3_Click()UnloadMeForm2.ShowEndSubPrivateSubForm_Load()Adodc2.RefreshLoopEndSub代碼:PrivateSubCommand1_Click()IfCombo1.Text=AndCombo2.Text=Thentext1.Text=AndText2.Text=ThenMsgBox “品名”和“型號(hào)”不能同時(shí)為空,必須輸入其中一項(xiàng)!,提示信息!ExitSubElseIfText1.Text=AndCombo3.Text=ThenText
48、4.Text=ThenMsgBox請(qǐng)輸入產(chǎn)品“數(shù)量”或“單位”之一!,提示信息!Text1.SetFocusExitSubEndIfIfText2.Text=ThenMsgBox請(qǐng)經(jīng)手人簽名!,vbCritical,提示信息!Text2.SetFocusExitSubEndIfAdodc1.RefreshEndIfDimpmAsStringDimpmsAsStringDimnAsStringDimmAsStringpm=Trim(Combo1.Text)n=Val(Text1.Text)pms=select*from 庫(kù)存表 where 品名=&pm&山EndIfDimXAsIntegerX=MsgBox(產(chǎn)品借出登記成功,是否繼續(xù)添加產(chǎn)品!,vbYesNo+vbQuestion+vbDefaultButton1,提示信息!)IfX=vbNoThenUnloadMeForm2.ShowEndIfCombo1.Text=Combo2.Text=Combo3.Text=Text1.Text=Text2.Text=Text3.Text=Text4.Text=DimZBAsStringZB
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 物流優(yōu)化管理的試題及答案
- 財(cái)務(wù)部門(mén)績(jī)效評(píng)估的實(shí)施細(xì)則計(jì)劃
- 急診科工作效率提升措施總結(jié)計(jì)劃
- 學(xué)期工作重點(diǎn)與展望計(jì)劃
- 班主任工作中的困惑與對(duì)策計(jì)劃
- 學(xué)期學(xué)習(xí)計(jì)劃的個(gè)性化制定
- 倉(cāng)庫(kù)運(yùn)營(yíng)成本分析計(jì)劃
- 提高問(wèn)題解決能力的工作策略計(jì)劃
- 探索自我價(jià)值的職場(chǎng)旅程計(jì)劃
- 生態(tài)儲(chǔ)存與氣候變化的關(guān)系:試題及答案
- 新版DFMEA基礎(chǔ)知識(shí)解析與運(yùn)用-培訓(xùn)教材
- 年度IT投資預(yù)算表格
- 學(xué)習(xí)質(zhì)量評(píng)價(jià):SOLO分類(lèi)理論
- 2023年上海學(xué)業(yè)水平考試生命科學(xué)試卷含答案
- 胰膽線陣超聲內(nèi)鏡影像病理圖譜
- 中醫(yī)內(nèi)科學(xué)總論-課件
- 免疫學(xué)防治(免疫學(xué)檢驗(yàn)課件)
- 消防水泵房操作規(guī)程
- 腹腔雙套管沖洗操作
- 《微型消防站建設(shè)標(biāo)準(zhǔn)》
- 中國(guó)少年先鋒隊(duì)入隊(duì)申請(qǐng)書(shū) 帶拼音
評(píng)論
0/150
提交評(píng)論