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

📄 frmwxjllook.frm

📁 很好用的通用库存管理程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmWXJLLook 
   BorderStyle     =   0  'None
   Caption         =   "维修记录查询"
   ClientHeight    =   5445
   ClientLeft      =   0
   ClientTop       =   105
   ClientWidth     =   8235
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   5445
   ScaleWidth      =   8235
   ShowInTaskbar   =   0   'False
   Begin VB.PictureBox Picture2 
      Appearance      =   0  'Flat
      BackColor       =   &H80000000&
      ForeColor       =   &H80000008&
      Height          =   3855
      Left            =   210
      ScaleHeight     =   3825
      ScaleWidth      =   7785
      TabIndex        =   2
      Top             =   960
      Width           =   7815
      Begin VB.PictureBox Picture1 
         Appearance      =   0  'Flat
         BackColor       =   &H80000000&
         ForeColor       =   &H80000008&
         Height          =   4080
         Left            =   0
         ScaleHeight     =   4050
         ScaleWidth      =   7545
         TabIndex        =   4
         Top             =   -255
         Width           =   7575
         Begin VB.CommandButton CmdDel 
            Caption         =   "删除"
            Height          =   255
            Index           =   0
            Left            =   6960
            TabIndex        =   7
            Top             =   0
            Width           =   615
         End
         Begin VB.CommandButton CmdCx 
            Appearance      =   0  'Flat
            Caption         =   "查询"
            Height          =   255
            Index           =   0
            Left            =   6360
            MaskColor       =   &H8000000C&
            TabIndex        =   6
            Top             =   0
            Width           =   615
         End
         Begin VB.CommandButton Command1 
            Caption         =   "操  作"
            Height          =   255
            Left            =   6360
            TabIndex        =   5
            Top             =   0
            Width           =   1215
         End
         Begin VB.Label LabBZ 
            Alignment       =   2  'Center
            Appearance      =   0  'Flat
            BackColor       =   &H80000005&
            BorderStyle     =   1  'Fixed Single
            Caption         =   "备注"
            ForeColor       =   &H80000008&
            Height          =   255
            Index           =   0
            Left            =   5160
            TabIndex        =   12
            Top             =   0
            Width           =   1215
         End
         Begin VB.Label LabWXSJ 
            Alignment       =   2  'Center
            Appearance      =   0  'Flat
            BackColor       =   &H80000005&
            BorderStyle     =   1  'Fixed Single
            Caption         =   "维修时间"
            ForeColor       =   &H80000008&
            Height          =   255
            Index           =   0
            Left            =   3960
            TabIndex        =   11
            Top             =   0
            Width           =   1215
         End
         Begin VB.Label LabName 
            Alignment       =   2  'Center
            Appearance      =   0  'Flat
            BackColor       =   &H80000005&
            BorderStyle     =   1  'Fixed Single
            Caption         =   "维修人员"
            ForeColor       =   &H80000008&
            Height          =   255
            Index           =   0
            Left            =   1920
            TabIndex        =   10
            Top             =   0
            Width           =   2055
         End
         Begin VB.Label LabBill 
            Alignment       =   2  'Center
            Appearance      =   0  'Flat
            BackColor       =   &H80000005&
            BorderStyle     =   1  'Fixed Single
            Caption         =   "保养单号"
            ForeColor       =   &H80000008&
            Height          =   255
            Index           =   0
            Left            =   600
            TabIndex        =   9
            Top             =   0
            Width           =   1335
         End
         Begin VB.Label LabBh 
            Alignment       =   2  'Center
            Appearance      =   0  'Flat
            BackColor       =   &H80000005&
            BorderStyle     =   1  'Fixed Single
            Caption         =   "编号"
            ForeColor       =   &H80000008&
            Height          =   255
            Index           =   0
            Left            =   0
            TabIndex        =   8
            Top             =   0
            Width           =   615
         End
      End
      Begin VB.VScrollBar VScroll1 
         Height          =   3855
         LargeChange     =   2400
         Left            =   7560
         Max             =   255
         SmallChange     =   255
         TabIndex        =   3
         Top             =   0
         Width           =   255
      End
   End
   Begin VB.CommandButton Command3 
      Caption         =   "关 闭"
      Height          =   375
      Left            =   6840
      TabIndex        =   0
      Top             =   4920
      Width           =   975
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "操  作"
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   6600
      TabIndex        =   18
      Top             =   720
      Width           =   1215
   End
   Begin VB.Label Label7 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "备注"
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   5400
      TabIndex        =   17
      Top             =   720
      Width           =   1215
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "保养时间"
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   4200
      TabIndex        =   16
      Top             =   720
      Width           =   1215
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "维修人员"
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   2160
      TabIndex        =   15
      Top             =   720
      Width           =   2055
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "保养单号"
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   840
      TabIndex        =   14
      Top             =   720
      Width           =   1335
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "编号"
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   240
      TabIndex        =   13
      Top             =   720
      Width           =   615
   End
   Begin VB.Label LabNmae 
      Caption         =   "临沂市长安物贸有限公司维修记录查询"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   375
      Left            =   1680
      TabIndex        =   1
      Top             =   120
      Width           =   4695
   End
End
Attribute VB_Name = "FrmWXJLLook"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub CmdCx_Click(Index As Integer)
  Bill = LabBill(Index)
  FrmWXJL.Show
End Sub
Private Sub CmdDel_Click(Index As Integer)
Dim a As Integer
Bill = LabBill(Index)
    sSql = "SELECT * FROM 维修记录 where 维修单号 ='" & Bill & "'"
   Rs.Open sSql, db, adOpenKeyset, adLockOptimistic, adCmdText
If Not Rs.EOF Then
  MsgBox "此单号下有维修记录,不能删除此单号!"
  Rs.Close
  Exit Sub
End If
Rs.Close

 a = MsgBox("********你确定要删除此维修单吗?**********" & vbCrLf _
        & "一旦删除将不可更改!" & vbCrLf _
        , vbExclamation + vbOKCancel + vbApplicationModal, "提示")
If a = 1 Then
    sSql = "delete FROM 维修单号 where 维修单号 ='" & Bill & "'"
 Rs.Open sSql, db, adOpenKeyset, adLockOptimistic, adCmdText
Set_Unload
Set_Init
End If
If a = 2 Then Exit Sub
End Sub


Private Sub Command3_Click()
Bill = ""
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_Init
End Sub
Private Sub Set_Init()
Dim i As Integer
    sSql = "SELECT ID,维修单号,维修人员,维修时间,备注 FROM 维修单号"
   Rs.Open sSql, db, adOpenKeyset, adLockOptimistic, adCmdText
  i = 1
  Do While Not Rs.EOF
    
    Load LabBh(i)
    Load LabBill(i)
    Load LabName(i)
    Load LabWXSJ(i)
    Load LabBZ(i)
    Load CmdCx(i)
    Load CmdDel(i)
    
   LabBh(i).Top = LabBh(i - 1).Top + 255
   LabBill(i).Top = LabBill(i - 1).Top + 255
   LabName(i).Top = LabName(i - 1).Top + 255
   LabWXSJ(i).Top = LabWXSJ(i - 1).Top + 255
   LabBZ(i).Top = LabBZ(i - 1).Top + 255
   CmdCx(i).Top = CmdCx(i - 1).Top + 255
   CmdDel(i).Top = CmdDel(i - 1).Top + 255
   
    LabBh(i).Visible = True:
    LabBill(i).Visible = True
    LabName(i).Visible = True
    LabWXSJ(i).Visible = True
    LabBZ(i).Visible = True
    CmdCx(i).Visible = True
    CmdDel(i).Visible = True
    
    LabBh(i) = i
    LabBill(i) = Rs("维修单号")
    LabName(i) = ""
    LabWXSJ(i) = ""
     LabBZ(i) = ""

    i = i + 1
    If i > 16 Then
       Picture1.Height = Picture1.Height + 255
       VScroll1.Visible = True
      VScroll1.Max = (i - 16) * 255
     End If
    Rs.MoveNext
  Loop

 Rs.Close
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  Bill = ""
End Sub

Private Sub Set_Unload() '卸载各lab
 For i = 1 To LabBh.Count - 1
    Unload LabBh(i)
    Unload LabBill(i)
    Unload LabName(i)
    Unload LabWXSJ(i)
    Unload LabBZ(i)
    Unload CmdCx(i)
    Unload CmdDel(i)
 Next i
End Sub
Private Sub VScroll1_Change()
Picture1.Top = VScroll1.Value * (-1) - 255
End Sub
Private Sub VScroll1_Scroll()
Picture1.Top = VScroll1.Value * (-1) - 255
End Sub

⌨️ 快捷键说明

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