【正文】
amp。 amp。 39。 amp。 Then MsgBox Error, vbOKOnly, Error Exit Sub End If c = c + 1 Next i Dim strusername As String Dim strpassword As String Static intlogintimes As Integer If Trim() = Then 沈 陽 大 學 課程 設計說明書 MsgBox 用戶名不能為空! , vbOKOnly + vbCritical, 錯誤 Exit Sub End If opentable adousers, usersinfo 姓名 = amp。 39。 Trim() amp。 ElseIf opttype Then opentable , select * from room where ((( ) like 39。 39。 Trim() amp。)) ElseIf optgrade Then opentable , select * from room where ((( ) like 39。 % amp。 amp。, , adSearchForward, 1 沈 陽 大 學 課程 設計說明書 If Not Then 39。 Trim() amp。, , adSearchForward, 1 If Then MsgBox 非法登記號 !, vbOKOnly + vbInformation, 提示 SendKeys {HOME}+{END} = Exit Sub End If 登記號 =39。 Trim() amp。, , adSearchForward, 1 If Not Then strusername = !姓名 strpassword = !密碼 Else strusername = strpassword = End If If strusername = And strpassword = Then Unload Me Else MsgBox 用戶名或密碼不對! , vbOKOnly + vbInformation, 提 示 沈 陽 大 學 課程 設計說明書 intlogintimes = intlogintimes + 1 If intlogintimes = 3 Then End End If SendKeys {HOME}+{END} End If End Sub Private Sub cmdcancel_click() Unload Me End Sub Option Explicit Private Sub Command1_Click() With If Not Then If Trim() = Then MsgBox 房間號不能為空! , vbOKOnly + vbInformation, 提示 Exit Sub End If End If !房間號 = Trim() !客房等級 = Trim() !客房類型 = Trim() !客房價格 = Trim() !客房狀態(tài) = Trim() 沈 陽 大 學 課程 設計說明書 !客房備注信息 = Update Unload Me End With End Sub Private Sub Command2_Click() Unload Me End Sub 退房登記實現(xiàn)代碼: Private Sub CmdOK_Click() With If Not Then If Trim() = Then MsgBox 登記號不能為空 !, vbOKOnly + vbInformation, 提示 Exit Sub End If 登記號 =39。 amp。 39。逐一判斷字符的合格化 If a(i) = Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i) = Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i) = Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i) = = Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i) = Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i) = ~ Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i) = , Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i)