【正文】
.ColWidth(6) = 1500 .CellAlignment = flexAlignCenterCenter .ColWidth(7) = 1200 End WithErrp:MsgBox , vbOKOnly, End SubPrivate Sub Commandquery_Click()Dim StrSqlold As StringDim StrConold As StringDim i As IntegerDim roomleitype As StringDim roomprice As StringDim roombedsum As StringOn Error GoTo Errp: Call makeTitle If = True Then roomleitype = Trim() StrSqlold = select typeorder,roomtype,explain,price1,price2,price3,price4,bed_num FROM shaparoom where roomtype = 39。建立表頭 With DbCommand .CommandType = adCmdText .CommandText = Select roomcode from roomstate Set DbTempSet = .Execute End With If Not ( And ) Then With DbTempSet .MoveFirst While Not .EOF With PosCbo .AddItem (LTrim(RTrim(DbTempSet!roomcode))) End With .MoveNext Wend End With = 0 Else MsgBox 沒有按此編號的客房!, vbOKOnly, End If With DbCommand .CommandText = Select roomtype from roomstate Set DbTempSet = .Execute End With If Not ( And ) Then While Not (LTrim(RTrim(DbTempSet!roomtype))) Wend = 0 Else MsgBox 沒有此種客房類型!, vbOKOnly, End If With DbCommand .CommandText = Select floor from roomstate Set DbTempSet = .Execute End With If Not ( And ) Then While Not (LTrim(RTrim(DbTempSet!floor))) + 樓 Wend = 0 Else MsgBox 此樓沒有客房!, vbOKOnly, End If With DbCommand .CommandText = Select reserved from roomstate Set DbTempSet = .Execute End With If Not ( And ) Then While Not (LTrim(RTrim(DbTempSet!Reserved))) Wend = 0 Else MsgBox 是否已經(jīng)預(yù)訂!, vbOKOnly, End If Exit SubErrp: MsgBox , vbOKOnly, End SubPrivate Sub BuildTitle()On Error GoTo Errp: With Xsheet .CellAlignment = flexAlignCenterCenter .Cols = 11 .TextMatrix(0, 0) = 房間號碼 .TextMatrix(0, 1) = 房間類型 .TextMatrix(0, 2) = 所屬樓層 .TextMatrix(0, 3) = 電話分機(jī) .TextMatrix(0, 4) = 目前狀態(tài) .TextMatrix(0, 5) = 是否預(yù)訂 .TextMatrix(0, 6) = 預(yù)訂時間 .TextMatrix(0, 7) = 空房時間 .TextMatrix(0, 8) = 備 注 .TextMatrix(0, 9) = 已經(jīng)選中 .TextMatrix(0, 10) = 已經(jīng)清掃 CellAlignment = flexAlignCenterCenter .ColWidth(0) = 900 .CellAlignment = flexAlignCenterCenter .ColWidth(1) = 800 .CellAlignment = flexAlignCenterCenter .ColWidth(2) = 1000 .CellAlignment = flexAlignCenterCenter .ColWidth(3) = 1000 .CellAlignment = flexAlignCenterCenter .ColWidth(4) = 1000 .CellAlignment = flexAlignCenterCenter .ColWidth(5) = 1000 .CellAlignment = flexAlignCenterCenter .ColWidth(6) = 1500 .CellAlignment = flexAlignCenterCenter .ColWidth(7) = 1200 .CellAlignment = flexAlignCenterCenter .ColWidth(8) = 1300 .CellAlignment = flexAlignCenterCenter .ColWidth(9) = 1100 .CellAlignment = flexAlignCenterCenter .ColWidth(10) = 1200 End WithErrp: MsgBox , vbOKOnly, End SubPrivate Sub Frame2_DragDrop(Source As Control, X As Single, Y As Single)End Sub打開主界面的“客房管理”,選擇“房型房價查詢”目的就是對房型名稱、普通價格查詢、床位數(shù)來進(jìn)行查詢。 + ordercondition + 39。 + roomleixing + 39。 + loucheng + 39。 + bianhao + 39。最后單擊退出按鈕回到主界面。 不能為空! MsgBox sMeg, vbOKOnly + vbExclamation, 警告 Exit Sub End If With DbCommand .CommandType = adCmdText .CommandText=insert into bill (bill,master,sex,certificate,certify_code,birthday,phone,address,unit,mastercode,guesttype,rebate,guestsum,male,female,shoes,start,willleave,housesum,deposit,confirmpeople,alreadypaid,remark,inputer,warning,cardid,forother,forwhose) Set DbTempSet = .Execute sMeg = 你的輸入信息已經(jīng)保存成功 MsgBox sMeg, vbOKOnly + vbExclamation, 提示 End WithErrp: MsgBox , vbOKOnly, End SubPrivate Sub Form_Load() On Error GoTo Errp: = 1400 = 2000 身份證 工作證 學(xué)生證 警官證 駕駛證 居住證 公務(wù)員 學(xué) 生 工 人 教 師 農(nóng) 民 軍 人 警 察 團(tuán)體 個人 男 女 是 否Errp: MsgBox , vbOKOnly, End Sub打開主界面的“客房管理”,選擇“客房信息查詢”目的就是對房間的編號、房間的類型、樓層、預(yù)定情況就行查詢。接待登記入住代碼如下:Private Sub cmmdexit_Click() Unload MeEnd SubPrivate Sub Commsave_Click() Dim StrSql As String Dim StrCon As String Dim sMeg As String Dim yhbill As String Dim yhmaster As String Dim yhsex As String Dim yhcertificate As String Dim yhcertify_code As String Dim yhbirthday As String Dim yhphone As String Dim yhaddress As String Dim yhunit As String Dim yhmastercode As String Dim yhguesttype As String Dim yhrebate As String Dim yhguestsum As String Dim yhmale As String Dim yhfemale As String Dim yhshoes As String Dim yhstart As String Dim yhwillleave As String Dim yhhousesum As String Dim yhdeposit As String Dim yhconfirmpeople As String Dim yhalreadypaid As String Dim yhremark As String Dim yhinputer As String Dim yhwarning As String Dim yhcardid As String Dim yhforother As String Dim yhforwhose As String On Error GoTo Errp: yhbill = Trim() yhmaster = Trim() yhsex = Trim() yhcertificate = Trim() yhcertify_code = Trim() yhbirthday = Trim() yhphone = Trim() yhaddress = Trim() yhunit = Trim() yhmastercode = Trim() yhguesttype = Trim() yhrebate = Trim() yhguestsum = Tr