【文章內(nèi)容簡介】
要?jiǎng)h除當(dāng)前記錄嗎? , vbYesNo + vbQuestion + vbDefaultButton2, 確認(rèn)框 ) = vbYes Then .Find 房間號(hào) = amp。 39。 amp。 ! 房間號(hào) amp。 39。, , adSearchForward, 1 If Not .EOF Then !客房狀態(tài) = 空 End If With .Delete End With End If End With End If End Sub Private Sub cmdedit_Click() If True And True Then With frmguestinfoedit .Caption = 修改客人信息 . = !登記號(hào) 9 . = True . = False . = !姓名 . = !身份證號(hào)碼 .txtroomno = !房間號(hào) . = !登記日期 . = False End With End If End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub Form_Load() = ( ) / 2 = ( ) / 4 dtgguestrefresh End Sub Option Explicit Dim proomno As String Private Sub cmdcancle_Click() Unload Me End Sub Private Sub cmdok_Click() With If Not Then If Trim() = Then MsgBox 登記號(hào)不能為空! , vbOKOnly + vbInformation, 提示 Exit Sub End If .Find 房間號(hào) = amp。 39。 amp。 txtbookno amp。 39。, , adSearchForward, 1 10 If Not .EOF Then MsgBox 已經(jīng)有相同登記號(hào)! , vbOKOnly + vbInformation, 提示 Exit Sub End If 房間號(hào) = amp。 39。 amp。 Trim() amp。 39。, , adSearchForward, 1 If Not Then If !客房狀態(tài) 空 Then MsgBox 已有客人居?。?, vbOKOnly + vbInformation, 提示 Exit Sub End If Else MsgBox 沒有此客房編號(hào) ,請(qǐng)重新輸入! , vbOKOnly + vbInformation, 提示 Exit Sub End If If Trim() = Then MsgBox 客人姓名不能為空! , vbOKOnly + vbInformation, 提示 Exit Sub End If .AddNew !登記號(hào) = Trim() 房間號(hào) = amp。 39。 amp。 Trim() amp。 39。, , adSearchForward, 1 !客房狀態(tài) = 有人 End If !姓名 = !身份證號(hào)碼 = !性別 = !籍貫 = If Then If Trim() proomno Then 11 With .Find 房間 號(hào) = amp。 39。 amp。 Trim() amp。 39。, , adSearchForward, 1 !客房狀態(tài) = 有人 .Find 房間號(hào) = amp。 39。 amp。 proomno amp。 39。, , adSearchForward, 1 !客房狀態(tài) = 空 End With End If End If !房間號(hào) = Trim() !登記日期 = .Update Unload Me End With End Sub Private Sub form_activate() proomno = Trim() End Sub Private Sub dtgQuitRefresh() With dtgQuitInfo 39。綁定 Set .DataSource = .AllowRowSizing = False 39。表頭寬度設(shè)為兩行 .HeadLines = 2 39。選擇方式為整行選中 .MarqueeStyle = dbgHighlightRow 39。不允許修改 (設(shè)為只讀 ) .AllowAddNew = False .AllowDelete = False .AllowUpdate = False 39。第一列標(biāo)題和寬度 .Columns(0).Caption = 登記號(hào) .Columns(0).Width = 700 12 .Columns(0).AllowSizing = False 39。第二列標(biāo)題和寬度 .Columns(1).Caption = 登記日期 .Columns(1).Width = 1200 .Columns(1).AllowSizing = False 39。第三列標(biāo)題和寬度 .Columns(2).Caption = 退房時(shí)間 .Columns(2).Width = 1200 .Columns(2).AllowSizing = False 39。第四列標(biāo)題和寬度 .Columns(3).Caption = 付費(fèi)金額 .Columns(3).Width = 1200 .Columns(3).AllowSizing = Fa