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

📄 settime.frm

📁 进销存管理系统,我是个新手,请大家多多帮助哈1
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form setTime 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "设置考勤时间表"
   ClientHeight    =   1920
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4425
   Icon            =   "setTime.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1920
   ScaleWidth      =   4425
   StartUpPosition =   2  '屏幕中心
   Begin 工程1.XPContainer XPContainer1 
      Height          =   3375
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   4455
      _extentx        =   7858
      _extenty        =   5953
      caption         =   ""
      style           =   1
      Begin 工程1.isButton isButton3 
         Height          =   420
         Left            =   2760
         TabIndex        =   8
         Top             =   960
         Width           =   1215
         _extentx        =   2143
         _extenty        =   741
         icon            =   "setTime.frx":038A
         style           =   8
         caption         =   "关闭"
         iconalign       =   1
         inonthemestyle  =   0
         tooltiptitle    =   ""
         tooltipicon     =   0
         tooltiptype     =   0
         ttforecolor     =   0
         font            =   "setTime.frx":0726
      End
      Begin 工程1.isButton isButton1 
         Height          =   420
         Left            =   120
         TabIndex        =   6
         Top             =   960
         Width           =   1095
         _extentx        =   1931
         _extenty        =   741
         icon            =   "setTime.frx":074E
         style           =   8
         caption         =   "确认"
         iconalign       =   1
         inonthemestyle  =   0
         tooltiptitle    =   ""
         tooltipicon     =   0
         tooltiptype     =   0
         ttforecolor     =   0
         font            =   "setTime.frx":0AEA
      End
      Begin 工程1.isButton isButton2 
         Height          =   420
         Left            =   1440
         TabIndex        =   5
         Top             =   960
         Width           =   1215
         _extentx        =   2143
         _extenty        =   741
         icon            =   "setTime.frx":0B12
         style           =   8
         caption         =   "修改"
         iconalign       =   1
         inonthemestyle  =   0
         tooltiptitle    =   ""
         tooltipicon     =   0
         tooltiptype     =   0
         ttforecolor     =   0
         font            =   "setTime.frx":0EAE
      End
      Begin VB.TextBox txt_wan1 
         Appearance      =   0  'Flat
         DataField       =   "晚下班"
         DataSource      =   "Data1"
         ForeColor       =   &H000080FF&
         Height          =   270
         Left            =   3000
         TabIndex        =   2
         Top             =   360
         Width           =   855
      End
      Begin VB.TextBox txt_zs 
         Appearance      =   0  'Flat
         DataField       =   "早上班"
         DataSource      =   "Data1"
         ForeColor       =   &H000080FF&
         Height          =   270
         Left            =   1080
         TabIndex        =   1
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label7 
         BackStyle       =   0  'Transparent
         Caption         =   "设定格式:例如 8点半   输入为 8:30"
         ForeColor       =   &H000000C0&
         Height          =   255
         Left            =   360
         TabIndex        =   7
         Top             =   1560
         Width           =   3255
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "晚下班:"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   2160
         TabIndex        =   4
         Top             =   370
         Width           =   735
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "早上班:"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   240
         TabIndex        =   3
         Top             =   365
         Width           =   735
      End
   End
   Begin MSAdodcLib.Adodc adodc1 
      Height          =   330
      Left            =   960
      Top             =   3480
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "setTime"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
txt_zs.Enabled = False

txt_wan1.Enabled = False
Data_Start
End Sub

Private Sub isButton1_Click()
Data_SaveData
End Sub

Private Sub isButton2_Click()
txt_zs.Enabled = True

txt_wan1.Enabled = True
End Sub

Private Sub isButton3_Click()
Unload Me
End Sub
Private Function Data_Start()
Dim conn As adodb.Connection '定义ADO链接conn
Dim rs As adodb.Recordset '定义ADO记录集rs
Dim str As String


  Dim StrConnect As String '定义
   StrConnect = App.Path
    If Right(StrConnect, 1) <> "\" Then StrConnect = StrConnect + "\"
    StrConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & StrConnect & "\data\kq.mdb"
    Adodc1.ConnectionString = StrConnect
    Adodc1.CommandType = adCmdText
    Adodc1.RecordSource = "SELECT * FROM [考勤时间设定]"
    Adodc1.Refresh
    
    If Adodc1.Recordset.RecordCount <= 0 Then
    MsgBox "没有任何数据,请添加新的记录", vbInformation, "提示"
    Else
    Adodc1.Recordset.MoveFirst
    End If
  
    
    
'考勤时间设定

txt_zs.Text = Adodc1.Recordset.Fields("早上班") & vbunllstring

txt_wan1.Text = Adodc1.Recordset.Fields("晚下班") & vbunllstring

End Function


Sub Data_SaveData()
 Dim StrConnect As String '定义
   StrConnect = App.Path
    If Right(StrConnect, 1) <> "\" Then StrConnect = StrConnect + "\"
    StrConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & StrConnect & "\data\kq.mdb"
    Adodc1.ConnectionString = StrConnect
   Adodc1.CommandType = adCmdText
     Adodc1.RecordSource = "SELECT * FROM [考勤时间设定]"
     Adodc1.Refresh
 
 Adodc1.Recordset.Fields("早上班") = Trim("" & txt_zs)

 Adodc1.Recordset.Fields("晚下班") = Trim("" & txt_wan1)


 
 Adodc1.Recordset.Update
MsgBox "考勤时间设定成功", vbInformation, "提示,南充博创软件资讯有限公司"
End Sub

⌨️ 快捷键说明

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