⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form30.frm

📁 利用VB编写的一个完整的酒店管理程序,支持双数据库!
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form30 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "取消预定操作"
   ClientHeight    =   1815
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   4680
   LinkTopic       =   "Form30"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1815
   ScaleWidth      =   4680
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox txtfield 
      Height          =   375
      Index           =   0
      Left            =   1200
      TabIndex        =   1
      Top             =   360
      Width           =   2655
   End
   Begin VB.CommandButton 取消预定 
      Caption         =   "取消预定"
      Height          =   375
      Left            =   1320
      TabIndex        =   0
      Top             =   1200
      Width           =   2055
   End
   Begin VB.Label Label1 
      Caption         =   "房间号码"
      Height          =   255
      Left            =   360
      TabIndex        =   2
      Top             =   480
      Width           =   855
   End
End
Attribute VB_Name = "Form30"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'FIXIT: 使用 Option Explicit 可以避免隐式创建 Variant 类型的变量                                          FixIT90210ae-R383-H1984


Private Sub 取消预定_Click()
If Trim(txtfield(0).Text) = "" Then
      MsgBox "对不起,房间号必须输入?   ", vbInformation, "Hello!"
      txtfield(0).SetFocus
      Exit Sub
  End If
   
 '开始保存内容
   Dim db As Database
  Dim EF As Recordset
  
  Set db = OpenDatabase(ConData, False, False, Constr)
  Set EF = db.OpenRecordset("Select * from kf where 房间号= '" & txtfield(0).Text & "'", dbOpenDynaset)
  
    
      '==================1
'FIXIT: 用 "Trim$" 函数替换 "Trim" 函数                                                           FixIT90210ae-R9757-R1B8ZE
       If Trim(txtfield(0).Text) <> "" Then
          EF.Edit
          EF("房态") = "空房"
          
           
          
          EF.Update
          
          
       End If
      '-----------------2
      
      '-----------------
      
  EF.Close
  db.Close
   
  MsgBox "该房间已经取消预定!!", vbInformation


 txtfield(0).Text = ""
 txtfield(0).SetFocus
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -