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

📄 qtkx.frm

📁 关于图书销售管理
💻 FRM
📖 第 1 页 / 共 2 页
字号:
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00000000&
            Height          =   255
            Left            =   120
            TabIndex        =   11
            Top             =   1200
            Width           =   855
         End
         Begin VB.Label Label12 
            Caption         =   "方式"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00000000&
            Height          =   375
            Left            =   240
            TabIndex        =   10
            Top             =   720
            Width           =   615
         End
         Begin VB.Label Label1 
            Caption         =   "录入日期"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00000000&
            Height          =   375
            Left            =   120
            TabIndex        =   9
            Top             =   240
            Width           =   975
         End
         Begin VB.Label Label15 
            Caption         =   "备注"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00000000&
            Height          =   255
            Left            =   6000
            TabIndex        =   8
            Top             =   960
            Width           =   495
         End
      End
      Begin VB.Data Data3 
         Caption         =   "Data3"
         Connect         =   "Access"
         DatabaseName    =   ""
         DefaultCursorType=   0  '缺省游标
         DefaultType     =   2  '使用 ODBC
         Exclusive       =   0   'False
         Height          =   645
         Left            =   1680
         Options         =   0
         ReadOnly        =   0   'False
         RecordsetType   =   1  'Dynaset
         RecordSource    =   ""
         Top             =   4320
         Visible         =   0   'False
         Width           =   2175
      End
      Begin VB.Data Data2 
         Caption         =   "Data2"
         Connect         =   "Access"
         DatabaseName    =   ""
         DefaultCursorType=   0  '缺省游标
         DefaultType     =   2  '使用 ODBC
         Exclusive       =   0   'False
         Height          =   615
         Left            =   1680
         Options         =   0
         ReadOnly        =   0   'False
         RecordsetType   =   1  'Dynaset
         RecordSource    =   ""
         Top             =   3600
         Visible         =   0   'False
         Width           =   2175
      End
      Begin VB.Data Data1 
         Caption         =   "Data1"
         Connect         =   "Access"
         DatabaseName    =   ""
         DefaultCursorType=   0  '缺省游标
         DefaultType     =   2  '使用 ODBC
         Exclusive       =   0   'False
         Height          =   615
         Left            =   1680
         Options         =   0
         ReadOnly        =   0   'False
         RecordsetType   =   1  'Dynaset
         RecordSource    =   ""
         Top             =   2880
         Visible         =   0   'False
         Width           =   2175
      End
      Begin MSFlexGridLib.MSFlexGrid MSFlexGrid 
         Bindings        =   "qtkx.frx":050A
         Height          =   3855
         Left            =   120
         TabIndex        =   2
         Top             =   1920
         Width           =   8535
         _ExtentX        =   15055
         _ExtentY        =   6800
         _Version        =   393216
         Rows            =   20
         Cols            =   7
         BackColor       =   -2147483624
         ForeColor       =   -2147483642
         ForeColorFixed  =   0
         BackColorSel    =   64
         ForeColorSel    =   16777215
         BackColorBkg    =   16777215
         FocusRect       =   2
         GridLines       =   3
         AllowUserResizing=   1
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   11.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
   End
End
Attribute VB_Name = "qtkx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public dj, c As Integer
Public xgorbc As Boolean
Public bc As Boolean


Private Sub Command1_Click()
If dj = 1 Then
             'bc=False
             Data1.Recordset.FindFirst "kmdbh =   '" & MSFlexGrid.TextMatrix(c, 1) & "'"
             DTPicker1.Value = Data1.Recordset("lrrq")
             Combo1.Text = Data1.Recordset("fs")
             Combo3.Text = Data1.Recordset("zkmm")
             Combo4.Text = Data1.Recordset("mx")
             Text9.Text = Data1.Recordset("kmbh")
             Text1.Text = Data1.Recordset("se")
             Text13.Text = Data1.Recordset("bz")

          Response = MsgBox("确实要删除当前收款单吗?", vbYesNo + vbCritical + vbDefaultButton1, "提示")
          If Response = vbYes Then
              Data2.Recordset.Delete
              Data2.Refresh
               DTPicker1.Value = Date
                Combo1.Text = ""
                Combo3.Text = ""
                Combo4.Text = ""
                Text9.Text = ""
                'Text10.Text = ""
                Text1.Text = ""
                Text13.Text = ""

               dj = 0
             Else
                Exit Sub
                   End If
    Else
        MsgBox "请先选择好要删除的对象。 ", vbInformation, "提示"
        Exit Sub
    End If
  
End Sub

Private Sub Command2_Click()
czqtzk.Show
End Sub

Private Sub Command3_Click()
If Combo1.Text = "" Then
    MsgBox "收款方式不能为空。", vbExclamation, "提示"
    Combo1.SetFocus
    Exit Sub
End If
If Combo3.Text = "" Then
    MsgBox "收款名目不能为空。", vbExclamation, "提示"
    Exit Sub
End If
 If Len(Text13.Text) > 25 Then
    MsgBox "备注不能为超过25个字。", vbExclamation, "提示"
    Exit Sub
End If
   
bc = True
If dj = 2 Then
     Data1.Recordset.Edit
  Else
     Data1.Recordset.AddNew
End If
Data1.Recordset("zkmm") = Combo3.Text
Data1.Recordset("lrrq") = DTPicker1.Value
Data1.Recordset("fs") = Combo1.Text
Data1.Recordset("jsr") = Label4.Caption
Data1.Recordset("kmbh") = Text9.Text
Data1.Recordset("se") = Val(Text1.Text)
Data1.Recordset("mx") = Combo4.Text
Data1.Recordset("bz") = Text13.Text
Data1.Recordset.Update
Data1.Refresh
MSFlexGrid.ColWidth(0) = 200
MSFlexGrid.ColWidth(1) = 1500
MSFlexGrid.ColWidth(2) = 1200
MSFlexGrid.ColWidth(3) = 1300
MSFlexGrid.TextMatrix(0, 1) = "  科目编号"
MSFlexGrid.TextMatrix(0, 2) = " 录入日期"
MSFlexGrid.TextMatrix(0, 3) = "  方式"
MSFlexGrid.TextMatrix(0, 4) = "帐款明目"
MSFlexGrid.TextMatrix(0, 5) = "    明细"
MSFlexGrid.TextMatrix(0, 6) = "数额"
 MSFlexGrid.TextMatrix(0, 7) = "经手人  "
  MSFlexGrid.TextMatrix(0, 8) = "备注  "
DTPicker1.Value = Date
Combo1.Text = ""
Combo3.Text = ""
Combo4.Text = ""
Text9.Text = ""
'Text10.Text = ""
Text1.Text = ""
Text13.Text = ""

End Sub

Private Sub Command4_Click()
If Combo1.Text <> "" Or Combo3.Text <> "" Or Combo4.Text <> "" Then
             Response = MsgBox("当前记录还没有保存,是否需要保存?", vbYesNo + vbInformation + vbDefaultButton1, "提示")
        If Response = vbYes Then
            Call Command3_Click
            Unload Me
          Else
             Unload Me
        End If
     Else
        Unload Me
 End If
 
End Sub

Private Sub Command5_Click()
  On Error Resume Next
If dj = 1 Then
             bc = False
             Data1.Recordset.FindFirst "kmbh =   '" & MSFlexGrid.TextMatrix(c, 1) & "'"
             DTPicker1.Value = Data1.Recordset("lrrq")
             Combo1.Text = Data1.Recordset("fs")
             Combo3.Text = Data1.Recordset("zkmm")
             Combo4.Text = Data1.Recordset("mx")
             Text1.Text = Data1.Recordset("se")
             Text9.Text = Data1.Recordset("kmbh")
             Text13.Text = Data1.Recordset("bz")
             dj = 2
      Else
           MsgBox "请先选择好要修改的对象。 ", vbInformation, "提示"
           Exit Sub
End If

End Sub

Private Sub Dir1_Click()

End Sub

Private Sub Command6_Click()
bc = False
DTPicker1.Value = Date
Combo1.Text = ""
Combo3.Text = ""
Combo4.Text = ""
Text9.Text = ""
Text1.Text = ""
Text13.Text = ""
Call Form_Activate
End Sub


Private Sub Form_Activate()
DTPicker1.Value = Date
'Data2.Recordset.Update
Dim incount As Integer
Dim jj, ll, je As Variant
'Data2.Recordset.MoveLast
'incount = Data2.Recordset.RecordCount
'Data2.Recordset.MoveFirst
'载入经手人
 Data3.Recordset.MoveLast
 zycount = Data3.Recordset.RecordCount
 Data3.Recordset.MoveFirst
 Data3.Recordset.MoveNext
  Data3.Recordset.MoveFirst
  Data1.Recordset.MoveLast
  If (Val(Data1.Recordset("kmbh")) + 1) <= 9 Then Text9.Text = "000000000" & (Val(Data1.Recordset("kmbh")) + 1)
  If (Val(Data1.Recordset("kmbh")) + 1) > 9 And (Val(Data1.Recordset("kmbh")) + 1) < 100 Then
             Text9.Text = "00000000" & (Val(Data1.Recordset("kmbh")) + 1)
 End If
 If (Val(Data1.Recordset("kmbh")) + 1) > 99 And (Val(Data1.Recordset("kmbh")) + 1) < 1000 Then
             Text9.Text = "0000000" + (Val(Data1.Recordset("kmbh")) + 1)
 End If
  If (Val(Data1.Recordset("kmbh")) + 1) > 999 And (Val(Data1.Recordset("kmbh")) + 1) < 10000 Then
             Text9.Text = "000000" & (Val(Data1.Recordset("kmbh")) + 1)
 End If
  If (Val(Data1.Recordset("kmbh")) + 1) > 9999 And (Val(Data1.Recordset("kmbh")) + 1) < 100000 Then
             Text9.Text = "00000" & (Val(Data1.Recordset("kmbh")) + 1)
 End If
  If (Val(Data1.Recordset("kmbh")) + 1) > 99999 And (Val(Data1.Recordset("kmbh")) + 1) < 1000000 Then
  
             Text9.Text = "0000" & (Val(Data1.Recordset("kmbh")) + 1)
 End If
  If (Val(Data1.Recordset("kmbh")) + 1) > 999999 And (Val(Data1.Recordset("kmbh")) + 1) < 10000000 Then
             Text9.Text = "000" & (Val(Data1.Recordset("kmbh")) + 1)
 End If
  If (Val(Data1.Recordset("kmbh")) + 1) > 9999999 And (Val(Data1.Recordset("kmbh")) + 1) < 100000000 Then
             Text9.Text = "00" & (Val(Data1.Recordset("kmbh")) + 1)
 End If
  If (Val(Data1.Recordset("kmbh")) + 1) > 99999999 And (Val(Data1.Recordset("kmbh")) + 1) < 1000000000 Then
             Text9.Text = "0" & (Val(Data1.Recordset("kmbh")) + 1)
 End If
  If (Val(Data1.Recordset("kmbh")) + 1) > 999999999 And (Val(Data1.Recordset("kmbh")) + 1) < 10000000000# Then
             Text9.Text = Val(Data1.Recordset("kmbh")) + 1
 End If
 
  
MSFlexGrid.ColWidth(0) = 200
MSFlexGrid.ColWidth(1) = 1500
MSFlexGrid.ColWidth(2) = 1200
MSFlexGrid.ColWidth(3) = 1300
MSFlexGrid.ColWidth(5) = 1800

MSFlexGrid.TextMatrix(0, 1) = "  科目编号"
MSFlexGrid.TextMatrix(0, 2) = " 录入日期"
MSFlexGrid.TextMatrix(0, 3) = "  方式"
MSFlexGrid.TextMatrix(0, 4) = "帐款明目"
MSFlexGrid.TextMatrix(0, 5) = "    明细"
MSFlexGrid.TextMatrix(0, 6) = "数额"
 MSFlexGrid.TextMatrix(0, 7) = "经手人  "
  MSFlexGrid.TextMatrix(0, 8) = "备注  "
bc = True
  

End Sub

Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\db1.mdb"
Data1.RecordSource = "select * from qtzm"
Data2.DatabaseName = App.Path & "\db1.mdb"
Data2.RecordSource = "select * from  xhdd   "
Data3.DatabaseName = App.Path & "\db1.mdb"
Data3.RecordSource = "select * from zyzl"
Label4.Caption = dlm
End Sub

Private Sub Label17_Click()
'Debug.Print Date
End Sub

Private Sub MSFlexGrid_Click()
dj = 1
c = MSFlexGrid.Row
End Sub

Private Sub Text3_Click()
Text3.Text = Val(Text9.Text) - Val(Text10.Text)

End Sub

⌨️ 快捷键说明

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