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