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

📄 游客_景点_导游查询.frm

📁 一个小型的旅行社管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 游客景点导游查询 
   Caption         =   "游客-->景点、导游查询"
   ClientHeight    =   6480
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   8625
   LinkTopic       =   "Form1"
   Picture         =   "游客_景点_导游查询.frx":0000
   ScaleHeight     =   6480
   ScaleWidth      =   8625
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox Text8 
      Height          =   375
      Left            =   5160
      TabIndex        =   18
      Top             =   5040
      Width           =   1695
   End
   Begin VB.TextBox Text7 
      Height          =   375
      Left            =   1800
      TabIndex        =   16
      Top             =   5040
      Width           =   1455
   End
   Begin VB.TextBox Text6 
      Height          =   1695
      Left            =   5040
      TabIndex        =   8
      Top             =   2640
      Width           =   2055
   End
   Begin VB.TextBox Text5 
      Height          =   375
      Left            =   1680
      TabIndex        =   7
      Top             =   4440
      Width           =   2055
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   1680
      TabIndex        =   6
      Top             =   3840
      Width           =   2055
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1680
      TabIndex        =   5
      Top             =   3240
      Width           =   2055
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1680
      TabIndex        =   4
      Top             =   2640
      Width           =   2055
   End
   Begin VB.CommandButton 取消 
      Caption         =   "取消"
      Height          =   375
      Left            =   6360
      TabIndex        =   3
      Top             =   1200
      Width           =   855
   End
   Begin VB.CommandButton 查询 
      Caption         =   "查询"
      Height          =   375
      Left            =   6360
      TabIndex        =   2
      Top             =   480
      Width           =   855
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   4320
      TabIndex        =   1
      Top             =   1200
      Width           =   1695
   End
   Begin VB.ComboBox Combo1 
      Height          =   315
      ItemData        =   "游客_景点_导游查询.frx":44E61
      Left            =   4320
      List            =   "游客_景点_导游查询.frx":44E6B
      TabIndex        =   0
      Text            =   "请选择查询方式"
      Top             =   480
      Width           =   1815
   End
   Begin VB.Label Label8 
      BackStyle       =   0  'Transparent
      Caption         =   "导游姓名"
      ForeColor       =   &H00FFC0C0&
      Height          =   375
      Left            =   4080
      TabIndex        =   17
      Top             =   5040
      Width           =   735
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   "导游编号"
      ForeColor       =   &H00FFC0C0&
      Height          =   375
      Left            =   600
      TabIndex        =   15
      Top             =   5160
      Width           =   975
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "景点介绍"
      ForeColor       =   &H00FFC0C0&
      Height          =   375
      Left            =   4080
      TabIndex        =   14
      Top             =   2640
      Width           =   855
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "结束日期"
      ForeColor       =   &H00FFC0C0&
      Height          =   375
      Left            =   600
      TabIndex        =   13
      Top             =   4560
      Width           =   975
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "出发日期"
      ForeColor       =   &H00FFC0C0&
      Height          =   375
      Left            =   600
      TabIndex        =   12
      Top             =   3960
      Width           =   855
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "景点名称"
      ForeColor       =   &H00FFC0C0&
      Height          =   375
      Left            =   600
      TabIndex        =   11
      Top             =   3360
      Width           =   855
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "景点编号"
      ForeColor       =   &H00FFC0C0&
      Height          =   375
      Left            =   600
      TabIndex        =   10
      Top             =   2760
      Width           =   855
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "游客->景点导游查询"
      BeginProperty Font 
         Name            =   "方正舒体"
         Size            =   24
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFC0C0&
      Height          =   1095
      Left            =   360
      TabIndex        =   9
      Top             =   480
      Width           =   3495
   End
End
Attribute VB_Name = "游客景点导游查询"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub 查询_Click()
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.ConnectionString = "driver={SQL Server};server=zhangwei;database=travaldb"
db.Open
If Combo1.Text = "请选择查询方式" Then
MsgBox ("请选择您要查询的方式")
Text1.Text = ""
Else
If Combo1.Text = "游客编号" Then
  rs.Open "select * from 导游数据表,旅游景点数据表,游客数据表 where 游客编号 ='" & Trim(Text1.Text) & "' and  游客数据表.景点编号=旅游景点数据表.景点编号 and 游客数据表.导游编号=导游数据表.导游编号", db, 3, 3
    If rs.EOF Then
        MsgBox ("该游客不存在")
        Combo1.Text = "请选择查询方式"
        Text1.Text = ""
        rs.Close
    Else
        Text2.Text = rs("景点编号")
        Text3.Text = rs("景点名称")
        Text4.Text = rs("出发日期")
        Text5.Text = rs("结束日期")
        Text6.Text = rs("景点介绍")
        Text7.Text = rs("导游编号")
        Text8.Text = rs("导游姓名")
        rs.Close
    End If
Else
   rs.Open "select * from 导游数据表,旅游景点数据表,游客数据表 where 游客姓名 ='" & Trim(Text1.Text) & "'and 游客数据表.景点编号=旅游景点数据表.景点编号 and 游客数据表.导游编号=导游数据表.导游编号", db, 3, 3
    If rs.EOF Then
        MsgBox ("该游客不存在")
        Combo1.Text = "请选择查询方式"
        Text1.Text = ""
        rs.Close
    Else
        Text2.Text = rs("景点编号")
        Text3.Text = rs("景点名称")
        Text4.Text = rs("出发日期")
        Text5.Text = rs("结束日期")
        Text6.Text = rs("景点介绍")
        Text7.Text = rs("导游编号")
        Text8.Text = rs("导游姓名")
        rs.Close
    End If
End If
End If
End Sub

Private Sub 取消_Click()
Combo1.Text = "请选择查询方式"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text1.SetFocus
Text2.SetFocus
Text3.SetFocus
Text4.SetFocus
Text5.SetFocus
Text6.SetFocus
End Sub

⌨️ 快捷键说明

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