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

📄 form_shuru.frm

📁 计件工资统计系统 我的毕业设计 包含论文
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      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         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 工序表"
      Caption         =   "Adodc5"
      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
   Begin MSAdodcLib.Adodc Adodc4 
      Height          =   330
      Left            =   3120
      Top             =   5880
      Visible         =   0   'False
      Width           =   1215
      _ExtentX        =   2143
      _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         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 工序表"
      Caption         =   "Adodc4"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc3 
      Height          =   375
      Left            =   6840
      Top             =   5880
      Visible         =   0   'False
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   661
      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         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 统计表"
      Caption         =   "Adodc3"
      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
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   330
      Left            =   4680
      Top             =   6000
      Visible         =   0   'False
      Width           =   1215
      _ExtentX        =   2143
      _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         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 职员表"
      Caption         =   "Adodc2"
      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
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   5880
      Top             =   5400
      Visible         =   0   'False
      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         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 产品信息"
      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
   Begin VB.CommandButton Command1 
      Caption         =   "录入"
      Height          =   375
      Left            =   240
      TabIndex        =   0
      Top             =   5400
      Width           =   855
   End
End
Attribute VB_Name = "Form_shuru"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cp() As String
Dim zy() As String
Dim gx() As String
Dim strgongxu As String
Dim strzybh As String
 Dim cpsl, zysl, gxsl As Integer
Function notnul() As Boolean
   Dim flag As Boolean
   flag = True
   If Combo_xzcp.text = "" Then
     MsgBox "请选择产品"
     flag = False
   End If
   If Combo_xzzy.text = "" And flag = True Then
     MsgBox "请选择职员"
     flag = False
   End If
   If Text_lls.text = "" And flag = True Then
     MsgBox "请输入领料数"
     flag = False
   End If
      If Val(Text_lls.text) = 0 And flag = True Then
     MsgBox "领料数不能为0"
     flag = False
   End If
   
   notnul = flag
End Function


Private Sub Combo_xzcp_Click()
Text_cpxh.text = cp(1, Combo_xzcp.ListIndex + 1)
End Sub



Private Sub Combo_xzzy_Click()
Adodc2.Refresh
Adodc2.Recordset.Find ("职员名='" + Combo_xzzy.text + "'")
strzybh = Adodc2.Recordset.Fields("职员号").value
End Sub

Private Sub Command1_Click()
  '该功能尚未完成
  Dim hgps, bhgps As Integer
  If notnul() = True Then
  hgps = Val(Text_hgps.text)
  bhgps = Val(Text_bhgps.text)
  If Text_hgps.text = "" And Text_bhgps.text = "" Then
    hgps = Val(Text_lls.text)
  End If
  
  If Text_bhgps.text <> "" And Text_hgps.text = "" Then
   hgps = Val(Text_lls.text) - bhgps
   
  End If
   Adodc3.Refresh
   Adodc3.Recordset.AddNew
   Adodc3.Recordset.Fields("规格型号") = Text_cpxh.text
   Adodc3.Recordset.Fields("日期") = srrq.value
   Adodc3.Recordset.Fields("工序号") = strgongxu
   Adodc3.Recordset.Fields("职员号") = strzybh
   Adodc3.Recordset.Fields("领料数") = Val(Text_lls.text)
   Adodc3.Recordset.Fields("合格品数") = hgps
   Adodc3.Recordset.Fields("不合格品数") = bhgps
   Adodc3.Recordset.Update
   'MsgBox "该记录添加成功", vbOKOnly + vbInformation, "提示"
   Combo_xzzy.text = ""
   Combo_xzzy.SetFocus
   Text_lls.text = ""
   Text_hgps.text = ""
   Text_bhgps.text = ""
  End If
  Adodc6.Refresh
End Sub

Private Sub Command2_Click()
Form_tongji.Show
Form_tongji.SetFocus
End Sub

Private Sub Command3_Click()
If MsgBox("真的要删除吗", vbOKCancel + vbQuestion, "提示") = vbOK And Adodc6.Recordset.EOF = False And Adodc6.Recordset.BOF = False Then
  sql = "delete from 统计表 where idkey=" & Adodc6.Recordset.Fields("idkey")
  delsql (sql)
  Adodc6.Refresh
End If
End Sub

Private Sub Form_Load()
  Adodc1.Refresh
  Adodc2.Refresh
  Adodc5.Refresh
 srrq.value = Date
 cpsl = Adodc1.Recordset.RecordCount
 zysl = Adodc2.Recordset.RecordCount
 gxsl = Adodc5.Recordset.RecordCount
 ReDim cp(2, cpsl)
 For I = 1 To cpsl
  cp(1, I) = Adodc1.Recordset.Fields("规格型号")
  cp(2, I) = Adodc1.Recordset.Fields("名称")
  Combo_xzcp.AddItem (cp(2, I))
  Adodc1.Recordset.MoveNext
 Next
ReDim zy(3, zysl)
For I = 1 To zysl
  zy(1, I) = Adodc2.Recordset.Fields("职员号")
  zy(2, I) = Adodc2.Recordset.Fields("职员名")
  zy(3, I) = Adodc2.Recordset.Fields("工序号")
  'Combo_xzzy.AddItem (zy(2, i))
  Adodc2.Recordset.MoveNext
Next
ReDim gx(2, gxsl)
For I = 1 To gxsl
 gx(1, I) = Adodc5.Recordset.Fields("工序号")
 gx(2, I) = Adodc5.Recordset.Fields("工序名")
 Text_gx.AddItem (gx(2, I))
 Adodc5.Recordset.MoveNext
Next

End Sub



Private Sub Form_Resize()
On Error Resume Next
DataGrid1.Width = Me.Width - 4200

End Sub

Private Sub Text_bhgps_Change()
 Dim n As Integer
 n = Val(Text_lls.text) - Val(Text_hgps.text)
  If Val(Text_bhgps.text) > n Then
   Text_bhgps.text = Trim(Str(n))
 End If
End Sub

Private Sub Text_bhgps_KeyPress(KeyAscii As Integer)
 If (KeyAscii > 57 Or KeyAscii < 48) And KeyAscii <> 8 Then
  KeyAscii = 0
 End If

End Sub

Private Sub Text_gx_Click()
 Combo_xzzy.Clear
  For I = 1 To zysl
    If zy(3, I) = gx(1, Text_gx.ListIndex + 1) Then
     
      Combo_xzzy.AddItem (zy(2, I))
    End If
  Next
  strgongxu = gx(1, Text_gx.ListIndex + 1)
End Sub



Private Sub Text_hgps_Change()
 If Val(Text_hgps.text) > Val(Text_lls.text) Then
   Text_hgps.text = Text_lls.text
 End If
End Sub

Private Sub Text_hgps_KeyPress(KeyAscii As Integer)
 If (KeyAscii > 57 Or KeyAscii < 48) And KeyAscii <> 8 Then
  KeyAscii = 0
 End If

End Sub

Private Sub Text_lls_KeyPress(KeyAscii As Integer)
 If (KeyAscii > 57 Or KeyAscii < 48) And KeyAscii <> 8 Then
  KeyAscii = 0
 End If
End Sub

⌨️ 快捷键说明

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