Private Sub exit_Click()EndEnd SubPrivate Sub fixno_Click() Form12.ShowEnd SubPrivate Sub guestinfo_Click() Form7.ShowEnd SubPrivate Sub guestroom_Click() Form3.ShowEnd SubPrivate Sub MDIForm_Load()End SubPrivate Sub roombook_Click() Form10.ShowEnd SubPrivate Sub save_Click() Form2.ShowEnd SubPrivate Sub cmdin_Click() Form2.ShowUnload Form1End SubPrivate Sub cmdout_Click() EndEnd SubPrivate Sub Label1_Click() End SubPrivate Sub cmd1_Click()Static i As IntegerIf Text1.Text = "" ThenMsgBox "用户名不能为空!", vbOKOnly + vbCritical, "错误"Text1.SetFocusExit SubEnd IfAdouser.RefreshIf Not Adouser.Recordset.EOF ThenText1.Text = Adouser.Recordset!UserNameText2.Text = Adouser.Recordset!PasswordElseText1.Text = ""Text2.Text = ""End IfIf Text1.Text = Text1.Text And Text2.Text = Text2.Text ThenAdouser.Recordset.CloseUnload Form2frmmdi.ShowElseMsgBox "用户名或密码不正确!", vbOKOnly + vbInformation, "提示"i = i + 1If i >= 3 ThenAdouser.Recordset.CloseEndEnd IfText2.SetFocusUnload Form2End IfEnd SubPrivate Sub cmd2_Click() EndEnd SubPrivate Sub Form_Load() Text1.Text = ""Text2.Text = ""End SubPrivate Sub cmdadd_Click() Form4.ShowEnd SubPrivate Sub cmddelet_Click()Form5.ShowEnd SubPrivate Sub cmdfix_Click()Form6.ShowEnd SubPrivate Sub Command1_Click()frmmdi.ShowUnload Form3End SubPrivate Sub DataGrid1_Click()End SubPrivate Sub cmdadd_Click()Open App.Path & "\客房信息" For Append As #1Print #1, Space(10) & Text1.Text & Space(20) & Text2.Text & Space(20) & Text3.Text & Space(20)& Text4.Text & Space(20) & Text5.TextClose #1Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text1.SetFocusEnd SubPrivate Sub cmdlook_Click()Dim inputdata As Stringpic1.Clspic1.Printpic1.Print Space(20) & "房间编号" & Space(20) & "房间级别" & Space(20) & "房间类型" & Space(20) & "房间价格" & Space(20) & "是否住人"Open App.Path & "\客房信息" For Input As #1Do While Not EOF(1)Line Input #1, inputdatapic1.Print inputdataLoopClose #1Adoroom.RefreshEnd SubPrivate Sub Command1_Click()Form3.ShowUnload Form4End SubPrivate Sub Form_Load()Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""End SubPrivate Sub cmdok_Click() Adoroom.RefreshEnd SubPrivate Sub Command1_Click() Form3.ShowUnload Form5End SubPrivate Sub Form_Load()End SubPrivate Sub cmdok_Click()With Adodelet.RecordsetIf .EOF <> True And .BOF <> True ThenIf !是否住人ThenMsgBox "当前房间有客人居住,你不能删除!", vbOKOnly + vbInformation, "提示"Exit SubElseOn Error GoTo deleteerrWith Adodelet.RecordsetIf Not .EOF And Not .BOF ThenIf MsgBox("删除当前记录吗?", vbYesNo + vbQuestion) = vbYes Then.Delete.MoveNextIf .EOF Then .MoveLastEnd IfEnd IfEnd WithExit Subdeleteerr:MsgBox Err.DescriptionEnd IfEnd IfEnd WithEnd SubPrivate Sub cmgok_Click()On Error GoTo deleteerrWith Adodelet.RecordsetIf Not .EOF And Not .BOF ThenIf MsgBox("删除当前记录吗?", vbYesNo + vbQuestion) = vbYes Then.Delete.MoveNextIf .EOF Then .MoveLastEnd IfEnd IfEnd WithExit Subdeleteerr:MsgBox Err.DescriptionEnd SubPrivate Sub Command1_Click()Form3.ShowUnload Form6End SubPrivate Sub Form_Load()End SubPrivate Sub cmdadd_Click() Form8.ShowEnd SubPrivate Sub Command1_Click() Form9.ShowEnd SubPrivate Sub Command2_Click() frmmdi.ShowUnload Form7End SubPrivate Sub Command3_Click() Form11.ShowEnd SubPrivate Sub Form_Load()End SubOption ExplicitPrivate Sub txtcard_krypress(keyascii As Integer)If (keyascii < 48 Or keyascii > 57) And keyascii <> 8 Then keyascii = 0End IfEnd SubPrivate Sub txtroomno_krypress(keyascii As Integer)If (keyascii < 48 Or keyascii > 57) And keyascii <> 8 Then keyascii = 0End IfEnd SubPrivate Sub cmd1_Click()End SubPrivate Sub cmdcancel_Click()Form7.ShowUnload Form8End SubPrivate Sub cmdok_Click()Dim inputdata As StringOpen App.Path & "\客人信息" For Append As #1Adoguest.Recordset.AddNewPrint #1, Space(10) & txtguestname.Text & Space(25) & txtcard.Text & Space(25) & txtroomno.Text & Space(25) & txtdate.TextClose #1txtguestname.Text = ""txtcard.Text = ""txtroomno.Text = ""txtdate.Text = ""txtguestname.SetFocusEnd SubPrivate Sub Form_Load()txtroomno.Text = ""txtguestname.Text = ""txtcard.Text = ""txtdate.Text = ""End SubPrivate Sub Command1_Click()On Error GoTo deleteerrWith adoco1.RecordsetIf Not .EOF And Not .BOF ThenIf MsgBox("删除当前记录吗?", vbYesNo + vbQuestion) = vbYes Then .Delete.MoveNextIf .EOF Then .MoveLastEnd IfEnd IfEnd WithExit Subdeleteerr:MsgBox Err.DescriptionEnd SubPrivate Sub Command2_Click()Form7.ShowUnload Form9End SubPrivate Sub Form_Load()End SubPrivate Sub Command3_Click()On Error GoTo deleteerrWith Adobook.RecordsetIf Not .EOF And Not .BOF ThenIf MsgBox("删除当前记录吗?", vbYesNo + vbQuestion) = vbYes Then .Delete.MoveNextIf .EOF Then .MoveLastEnd IfEnd IfEnd WithExit Subdeleteerr:MsgBox Err.DescriptionEnd SubPrivate Sub Form_Load()End SubPrivate Sub Command1_Click() Adodc1.RefreshEnd SubPrivate Sub Command2_Click() Form7.ShowUnload Form11End SubPrivate Sub Form_Load()End SubPrivate Sub Command1_Click()Dim sqlstmt As Stringsqlstmt = "insert into books (username,password,)" _+ "values('" + Trim(UserName) + "','" + Trim(Password) Adodc1.Recordset.AddNewAdodc1.Recordset!UserName = Trim(Text1.Text)Adodc1.Recordset!Password = Trim(Text2.Text)Adodc1.Recordset.UpdateAdodc1.RefreshMsgBox ("it is ok !")Text1.Text = " "Text2.Text = " "End SubPrivate Sub Command2_Click()Form2.ShowUnload Form12End SubPrivate Sub Form_Load()End Sub。