资源描述:
《家庭财务管理系统课程设计的原代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、1、frm_borrowgo.frmDimMydbAsNewADODB.RecordsetDimMydb1AsNewADODB.RecordsetDimStr_textAsStringDimstrflagAsStringPrivateSubcmd_add_Click()txt_man.Locked=Falsetxt_way.Locked=Falsetxt_money.Locked=FalseCombo1.Locked=FalseCheck1.Enabled=TrueDTPicker1.Enabled=Truetxt_man.Text=""txt_way.Text=""txt_
2、money.Text=""Combo1.Text=""strflag="添加"Cmdsave.Enabled=TrueEndSubPrivateSubcmd_close_Click()UnloadMeEndSubPrivateSubcmd_del_Click()DimAAsBooleanA=MsgBox("是否真的要删除这条记录?",vbOKCancel+32+256,"删除")IfA=TrueThenExeCutesql"deletefrom借出where得款人='"&txt_man.Text&"'",Str_textMsgBox"记录已删除!",,"删除"IfMydb.R
3、ecordCount>0ThenMydb.MoveNextIfMydb.EOFThenMydb.MoveLastCallDbCallBangdingLabel7.Caption=Mydb.RecordCountEndIfEndIfEndSubPrivateSubcmd_edit_Click()OnErrorResumeNextDimAAsBooleantxt_man.Locked=Falsetxt_way.Locked=Falsetxt_money.Locked=FalseCombo1.Locked=FalseCheck1.Enabled=TrueDTPicker1.Enab
4、led=Truestrflag="修改"Cmdsave.Enabled=TrueEndSubPrivateSubCmdsave_Click()OnErrorResumeNextDimAAsBooleanIfstrflag="添加"ThenA=MsgBox("是否添加前记录?",vbYesNo+32,"添加记录")IfA=TrueThenExeCutesql"insertinto借出values('"&txt_man.Text&"','"&txt_money.Text&"','"&Combo1.Text&"','"&DTPicker1.Value&"','"&txt_way.T
5、ext&"','"&Check1.Value&"')",Str_textMsgBox"数据已经保存!",vbOKOnly+64,"成功"CallDbLabel7.Caption=Mydb.RecordCountEndIfElseIfstrflag="修改"ThenA=MsgBox("是否修改前记录?",vbYesNo+32,"添加记录")IfA=TrueThenMydb.Update'Mydb.RequeryCallDbMsgBox"数据修改成功!",vbOKOnly+64,"成功"EndIfEndIfCmdsave.Enabled=Falsetxt_man.Locked=T
6、ruetxt_way.Locked=Truetxt_money.Locked=TrueCombo1.Locked=TrueCheck1.Enabled=FalseDTPicker1.Enabled=FalseEndSubPrivateSubCombo1_Change()DimAAsIntegerSetMydb1=ExeCutesql("select姓名from成员",Str_text)'SetCombo1.DataSource=Mydb1A=Mydb1.RecordCountForI=1ToACombo1.AddItemMydb1.Fields(0)Mydb1.MoveNex
7、tIfMydb1.EOFThenExitForNextIEndSubPrivateSubCommand1_Click()OnErrorResumeNext'CallDbMydb.MoveFirstCallBangdingEndSubPrivateSubCommand2_Click()OnErrorResumeNext'CallDb'IfNotMydb.BOFThenMydb.MovePreviousMydb.MovePreviousIfMydb.BOFThenMsgBox"这已经是第一条记录了!",vb