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

📄 frmaddplace.frm

📁 包含了源代码,说明文档和可执行文件.为青岛公交查询系统.实现了模糊查询.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmAddPlace 
   Caption         =   "添加地点信息"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8550
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   3195
   ScaleWidth      =   8550
   WindowState     =   2  'Maximized
   Begin VB.Frame Frame1 
      Caption         =   "地点信息"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1455
      Left            =   240
      TabIndex        =   2
      Top             =   360
      Width           =   9135
      Begin VB.TextBox textAboutLine 
         Height          =   375
         Left            =   5040
         TabIndex        =   10
         Top             =   960
         Width           =   2295
      End
      Begin VB.TextBox textAboutPlat 
         Height          =   375
         Left            =   1440
         TabIndex        =   9
         Top             =   840
         Width           =   2295
      End
      Begin VB.TextBox textPlaceName 
         Height          =   375
         Left            =   5040
         TabIndex        =   4
         Top             =   360
         Width           =   2295
      End
      Begin VB.TextBox textPlaceNO 
         Height          =   375
         Left            =   1440
         TabIndex        =   3
         Top             =   360
         Width           =   2295
      End
      Begin VB.Label Label2 
         Caption         =   "地点名称:"
         Height          =   375
         Left            =   4080
         TabIndex        =   8
         Top             =   480
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "相关线路: "
         Height          =   375
         Left            =   4080
         TabIndex        =   7
         Top             =   960
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "相关站点: "
         Height          =   375
         Left            =   480
         TabIndex        =   6
         Top             =   960
         Width           =   975
      End
      Begin VB.Label Label13 
         Caption         =   "地点编号:"
         Height          =   375
         Left            =   480
         TabIndex        =   5
         Top             =   480
         Width           =   975
      End
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   495
      Left            =   5280
      TabIndex        =   1
      Top             =   2160
      Width           =   1575
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "添加"
      Height          =   495
      Left            =   2280
      TabIndex        =   0
      Top             =   2160
      Width           =   1575
   End
End
Attribute VB_Name = "frmAddPlace"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit







Private Sub cmdCancel_Click()
    Unload Me
    Exit Sub
End Sub



Private Sub cmdOK_Click()
    Dim sql As String
    Dim rs As ADODB.Recordset
    If Trim(textPlaceNO.Text) = "" Then                              '判断站点编号是否为空
        MsgBox "请输入站点编号!", vbOKOnly + vbExclamation, "警告"
        Exit Sub
        textPlaceNO.SetFocus
    Else
        sql = "select * from PlaceInfo where PlaceNO='" & textPlaceNO & "'"
        Set rs = getRS(sql, "shujuku")
        If rs.EOF = False Then                                    '判断是否已经存在地点编号
            MsgBox "这个站点编号已经存在!请重新输入线路编号!", vbOKOnly + vbExclamation, "警告"
            textPlaceNO.SetFocus
            textPlaceNO.Text = ""
            textPlaceName.Text = ""
            textAboutPlat.Text = ""
            textAboutLine.Text = ""
            
            Exit Sub
        Else                                                                       '添加用户
                sql = "insert into PlaceInfo (PlaceNO,PLaceName,AboutPlat,AboutLine) values('" & textPlaceNO
                sql = sql & "','" & textPlaceName
                sql = sql & "','" & textAboutPlat
                sql = sql & "','" & textAboutLine & "')"
                
                Call TransactSQL(sql, "shujuku")
                MsgBox "添加成功!", vbOKOnly + vbExclamation, "添加结果"
                                                                                 '重新设置初始化为空
            textPlaceNO.Text = ""
            textPlaceName.Text = ""
            textAboutPlat.Text = ""
            textAboutLine.Text = ""
                  textPlaceNO.SetFocus
           frmmanagePlace.Show
           frmmanagePlace.ZOrder 0
           Unload Me
        End If
    End If
End Sub

Private Sub Form_Load()
            textPlaceNO.Text = ""
            textPlaceName.Text = ""
            textAboutPlat.Text = ""
            textAboutLine.Text = ""

    End Sub






Private Sub Label14_Click()

End Sub

⌨️ 快捷键说明

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