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

📄 main_tfcx.frm

📁 这个原代码书上有,但是我把它做出来,与大家共享,希望大家喜欢
💻 FRM
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form main_tfcx 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "退宿查询"
   ClientHeight    =   3270
   ClientLeft      =   45
   ClientTop       =   1950
   ClientWidth     =   8250
   Icon            =   "main_tfcx.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3270
   ScaleWidth      =   8250
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "C:\mrjd\kfgl.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   -120
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "tfd"
      Top             =   615
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.Frame Frame1 
      Height          =   675
      Left            =   30
      TabIndex        =   1
      Top             =   -30
      Width           =   8115
      Begin VB.CommandButton Command3 
         BackColor       =   &H00C0C0C0&
         Caption         =   "退出"
         Height          =   330
         Left            =   6900
         Style           =   1  'Graphical
         TabIndex        =   6
         Top             =   225
         Width           =   1050
      End
      Begin VB.CommandButton Command2 
         BackColor       =   &H00C0C0C0&
         Caption         =   "删除"
         Height          =   330
         Left            =   5955
         Style           =   1  'Graphical
         TabIndex        =   5
         Top             =   225
         Width           =   870
      End
      Begin VB.CommandButton Command1 
         BackColor       =   &H00C0C0C0&
         Caption         =   "修改"
         Height          =   330
         Left            =   4995
         Style           =   1  'Graphical
         TabIndex        =   4
         Top             =   225
         Width           =   885
      End
      Begin VB.TextBox Text1 
         Height          =   315
         Left            =   1005
         TabIndex        =   2
         Top             =   240
         Width           =   2400
      End
      Begin VB.Label Label1 
         Caption         =   "姓名:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         TabIndex        =   3
         Top             =   285
         Width           =   915
      End
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "main_tfcx.frx":000C
      Height          =   2490
      Left            =   30
      OleObjectBlob   =   "main_tfcx.frx":0020
      TabIndex        =   0
      Top             =   705
      Width           =   8145
   End
End
Attribute VB_Name = "main_tfcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
 Data1.DatabaseName = App.Path & "\KFGL.MDB"     '自动识别数据库路径
End Sub
Private Sub Form_Unload(Cancel As Integer)
 main.Enabled = True
End Sub
Private Sub Text1_Change()     '按客人姓名查询退宿信息
 Data1.RecordSource = "select * from tfd where tfd.姓名 like " + Chr(34) + Text1.Text + "*" + Chr(34) + ""
 Data1.Refresh
End Sub
Private Sub Command1_Click()     '允许修改退宿记录
 DBGrid1.AllowUpdate = True
End Sub
Private Sub Command2_Click()     '删除退宿记录
If Data1.Recordset.RecordCount > 0 Then
 Data1.Recordset.Delete
 Data1.Refresh
End If
End Sub
Private Sub Command3_Click()
 main.Enabled = True
 Unload Me
End Sub

⌨️ 快捷键说明

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