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

📄 按员工号查询奖励情况.frm

📁 很好的VB加SQL系统,可以实现删除擦看添加等功能
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Form6 
   Caption         =   "按员工号查询奖励情况"
   ClientHeight    =   5535
   ClientLeft      =   60
   ClientTop       =   435
   ClientWidth     =   7440
   LinkTopic       =   "Form6"
   ScaleHeight     =   5535
   ScaleWidth      =   7440
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command3 
      Caption         =   "退出"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5400
      TabIndex        =   5
      Top             =   3720
      Width           =   1575
   End
   Begin VB.CommandButton Command2 
      Caption         =   "清除"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5400
      TabIndex        =   4
      Top             =   2040
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "查询"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5400
      TabIndex        =   3
      Top             =   480
      Width           =   1575
   End
   Begin MSFlexGridLib.MSFlexGrid MSG 
      Height          =   3615
      Left            =   240
      TabIndex        =   2
      Top             =   1560
      Width           =   4575
      _ExtentX        =   8070
      _ExtentY        =   6376
      _Version        =   393216
   End
   Begin VB.TextBox Text1 
      Height          =   855
      Left            =   2760
      TabIndex        =   1
      Top             =   360
      Width           =   2055
   End
   Begin VB.Label Label1 
      Caption         =   "员工号:"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   360
      TabIndex        =   0
      Top             =   480
      Width           =   2055
   End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()

 Dim cnn As ADODB.Connection
    Dim rs As ADODB.Recordset
    
    Set cnn = New ADODB.Connection
    Set rs = New ADODB.Recordset
    
    Dim connectionString As String
    connectionString = "dsn=人事管理;uid=sa;pwd="
    
    cnn.Open connectionString
    
    Dim sqlString As String
    
    sqlString = "SELECT dbo.奖励基本信息.奖励信息, dbo.员工基本信息.姓名" & _
               " FROM dbo.奖励基本信息 INNER JOIN" & _
            " dbo.员工基本信息 ON dbo.奖励基本信息.编号 = dbo.员工基本信息.编号" & _
            " WHERE dbo.员工基本信息.编号='" & Text1.Text & "'"
    rs.Open sqlString, cnn
    
       MSG.Clear
    
    i = 1

    MSG.Cols = 2
    MSG.Rows = 1
    MSG.TextMatrix(0, 0) = "奖励信息"
    MSG.TextMatrix(0, 1) = "姓名"
    


Do While Not rs.EOF
    MSG.Rows = MSG.Rows + 1
    MSG.TextMatrix(i, 0) = rs.Fields(0)
    MSG.TextMatrix(i, 1) = rs.Fields(1)
   
   
    i = i + 1
    rs.MoveNext
Loop
    
    
    rs.Close
    cnn.Close
End Sub


Private Sub Command2_Click()
Text1.Text = ""
End Sub

Private Sub Command3_Click()
Unload Me
Form1.Show
End Sub


⌨️ 快捷键说明

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