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

📄 frmwxjladd.frm

📁 很好用的通用库存管理程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmWxJLAdd 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "维修记录_新增"
   ClientHeight    =   4545
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   3525
   ControlBox      =   0   'False
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   4545
   ScaleWidth      =   3525
   Begin VB.TextBox Text7 
      ForeColor       =   &H80000006&
      Height          =   270
      Left            =   1200
      TabIndex        =   8
      Top             =   3555
      Width           =   2055
   End
   Begin VB.TextBox Text6 
      ForeColor       =   &H80000006&
      Height          =   270
      Left            =   1200
      TabIndex        =   7
      Top             =   3118
      Width           =   2055
   End
   Begin VB.TextBox Text5 
      ForeColor       =   &H80000006&
      Height          =   270
      Left            =   1200
      TabIndex        =   6
      Top             =   2682
      Width           =   2055
   End
   Begin VB.TextBox Text4 
      ForeColor       =   &H80000006&
      Height          =   270
      Left            =   1200
      TabIndex        =   5
      Top             =   2246
      Width           =   2055
   End
   Begin VB.TextBox Text1 
      ForeColor       =   &H80000006&
      Height          =   270
      Left            =   1200
      TabIndex        =   0
      Top             =   472
      Width           =   2055
   End
   Begin VB.ComboBox Cmb1 
      Height          =   300
      Left            =   1200
      TabIndex        =   4
      Top             =   1780
      Width           =   2055
   End
   Begin VB.CommandButton Command1 
      Caption         =   "添 加"
      Height          =   375
      Left            =   480
      TabIndex        =   9
      Top             =   4080
      Width           =   855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取  消"
      Height          =   375
      Left            =   1920
      TabIndex        =   2
      Top             =   4080
      Width           =   975
   End
   Begin VB.TextBox Text2 
      ForeColor       =   &H80000006&
      Height          =   270
      Left            =   1200
      ScrollBars      =   2  'Vertical
      TabIndex        =   1
      Top             =   908
      Width           =   2055
   End
   Begin VB.TextBox Text3 
      ForeColor       =   &H80000006&
      Height          =   270
      Left            =   1200
      ScrollBars      =   2  'Vertical
      TabIndex        =   3
      Top             =   1344
      Width           =   2055
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "零件编号:"
      ForeColor       =   &H00FF0000&
      Height          =   180
      Left            =   120
      TabIndex        =   18
      Top             =   3192
      Width           =   900
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "厂 家:"
      ForeColor       =   &H00FF0000&
      Height          =   180
      Left            =   240
      TabIndex        =   17
      Top             =   2760
      Width           =   630
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "反映时间:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   120
      TabIndex        =   16
      Top             =   957
      Width           =   1095
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "故障名称:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   120
      TabIndex        =   15
      Top             =   480
      Width           =   975
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "维修人员:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   120
      TabIndex        =   14
      Top             =   1911
      Width           =   1095
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "维修时间:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   120
      TabIndex        =   13
      Top             =   1434
      Width           =   975
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "更换件:"
      ForeColor       =   &H00FF0000&
      Height          =   180
      Left            =   240
      TabIndex        =   12
      Top             =   2280
      Width           =   720
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "维修记录详细资料"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   255
      Left            =   960
      TabIndex        =   11
      Top             =   120
      Width           =   1695
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "备 注"
      ForeColor       =   &H00FF0000&
      Height          =   180
      Left            =   240
      TabIndex        =   10
      Top             =   3600
      Width           =   450
   End
End
Attribute VB_Name = "FrmWxJLAdd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
 If Cmb1.Text = "" Then
  MsgBox "请选择维修人员!"
  Exit Sub
 End If
  If Text1.Text = "" Then
  MsgBox "请填写故障名称!"
  Exit Sub
 End If
 If Text2.Text = "" Then
  MsgBox "请填写反映时间!"
  Exit Sub
 End If
 If Text3.Text = "" Then
  MsgBox "请填写维修时间!"
  Exit Sub
 End If
  If Text4.Text = "" Then
  MsgBox "请填写更换件!"
  Exit Sub
 End If
  If Text5.Text = "" Then
  MsgBox "请填写厂家!"
  Exit Sub
 End If
   If Text6.Text = "" Then
  MsgBox "请填写零件编号!"
  Exit Sub
 End If

Dim a As Integer
 a = MsgBox("********你确定此操作吗?**********" & vbCrLf _
        , vbExclamation + vbOKCancel + vbApplicationModal, "提示")
If a = 1 Then
 
      sSql = "SELECT * FROM 维修记录"
     Rs.Open sSql, db, adOpenKeyset, adLockOptimistic, adCmdText
   Rs.AddNew
   Rs!维修单号 = Bill
   Rs!故障名称 = Text1.Text
   Rs!反映时间 = Text2.Text
   Rs!维修时间 = Text3.Text
   Rs!维修人员 = Cmb1.Text
   Rs!更换件 = Text4.Text
   Rs!厂家 = Text5.Text
   Rs!零件编号 = Text6.Text
   If Text7.Text = "" Then Rs!备注 = "-" Else Rs!备注 = Text7.Text
   Rs.Update
   Rs.Close
   
  MsgBox "添加成功!"
FrmWXJL.Show
Unload Me
End If
If a = 2 Then Exit Sub
End Sub
Private Sub Command2_Click()
FrmWXJL.Show
Unload Me
End Sub

Private Sub Form_Load()
Me.Top = MDIFrmMain.Height / 2 - Me.Height / 2 - 1000
Me.Left = MDIFrmMain.Width / 2 - Me.Width / 2
 Set Rs = New Recordset
  Set_Ygb
  Text2.Text = Date
  Text3.Text = Date
End Sub
Private Sub Set_Ygb() '员工表
Dim i As Integer
 'On Error GoTo DataErr
   sSql = "SELECT 姓名 FROM 员工表"
 Rs.Open sSql, db, adOpenKeyset, adLockOptimistic, adCmdText
Cmb1.Clear
Do While Not Rs.EOF
 Cmb1.AddItem Rs.Fields(0)
 Rs.MoveNext
 Loop
Rs.Close

  Exit Sub
'DataErr:
 '    MsgBox Err.Description
End Sub

⌨️ 快捷键说明

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