📄 form4.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form Form4
AutoRedraw = -1 'True
Caption = "Form7"
ClientHeight = 8670
ClientLeft = 2520
ClientTop = 1485
ClientWidth = 11100
LinkTopic = "Form7"
MDIChild = -1 'True
Picture = "Form4.frx":0000
ScaleHeight = 8670
ScaleWidth = 11100
Begin VB.ListBox List1
Height = 1320
ItemData = "Form4.frx":1BA4C
Left = 2880
List = "Form4.frx":1BA4E
TabIndex = 20
Top = 4440
Width = 3855
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 720
TabIndex = 19
Top = 1920
Width = 3855
_ExtentX = 6800
_ExtentY = 661
_Version = 393216
Format = 22806529
CurrentDate = 39686
End
Begin VB.TextBox txt
BackColor = &H00C0FFFF&
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 9840
TabIndex = 18
Top = 720
Width = 855
End
Begin VB.TextBox Text1
Height = 375
Left = 720
TabIndex = 10
Text = " "
Top = 480
Width = 3855
End
Begin VB.TextBox Text2
Height = 375
Left = 720
TabIndex = 9
Text = " "
Top = 960
Width = 3855
End
Begin VB.TextBox Text3
Height = 375
Left = 720
TabIndex = 8
Text = " "
Top = 1440
Width = 3855
End
Begin VB.TextBox Text4
Height = 375
Left = 5640
TabIndex = 7
Text = " "
Top = 480
Width = 3615
End
Begin VB.TextBox Text5
Height = 375
Left = 5640
TabIndex = 6
Text = " "
Top = 960
Width = 3615
End
Begin VB.TextBox Text6
Height = 375
Left = 5640
TabIndex = 5
Text = " "
Top = 1440
Width = 3615
End
Begin VB.CommandButton Command1
Caption = "第一个"
Height = 375
Left = 360
TabIndex = 3
Top = 7680
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "最后一个"
Height = 375
Left = 1560
TabIndex = 2
Top = 7680
Width = 1215
End
Begin VB.CommandButton Command5
Caption = "确定"
Height = 375
Left = 7440
TabIndex = 1
Top = 7680
Width = 1095
End
Begin VB.CommandButton Command6
Caption = "取消"
Height = 375
Left = 8760
TabIndex = 0
Top = 7680
Width = 1215
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 5055
Left = 360
TabIndex = 4
Top = 2400
Width = 10335
_ExtentX = 18230
_ExtentY = 8916
_Version = 393216
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = " 期数:"
Height = 180
Left = 120
TabIndex = 17
Top = 600
Width = 630
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "货号:"
Height = 180
Left = 120
TabIndex = 16
Top = 1080
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "货名:"
Height = 180
Left = 120
TabIndex = 15
Top = 1560
Width = 540
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "数量:"
Height = 180
Left = 5160
TabIndex = 14
Top = 600
Width = 540
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "负责人:"
Height = 180
Left = 4920
TabIndex = 13
Top = 1080
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "时间:"
Height = 180
Left = 5160
TabIndex = 12
Top = 1560
Width = 540
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "日期:"
Height = 180
Left = 120
TabIndex = 11
Top = 2040
Width = 540
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a As String
Dim b As Integer
Dim c As Integer
Private Sub Command1_Click()
MSFlexGrid1.Row = 1
Text1.Text = MSFlexGrid1.TextMatrix(1, 1)
Text2.Text = MSFlexGrid1.TextMatrix(1, 2)
Text3.Text = MSFlexGrid1.TextMatrix(1, 3)
Text4.Text = MSFlexGrid1.TextMatrix(1, 4)
Text5.Text = MSFlexGrid1.TextMatrix(1, 5)
Text6.Text = MSFlexGrid1.TextMatrix(1, 6)
DTPicker1.Value = MSFlexGrid1.TextMatrix(1, 7)
End Sub
Private Sub Command4_Click()
MSFlexGrid1.Row = MSFlexGrid1.Rows - 1
b = MSFlexGrid1.Rows - 1
Text1.Text = MSFlexGrid1.TextMatrix(b, 1)
Text2.Text = MSFlexGrid1.TextMatrix(b, 2)
Text3.Text = MSFlexGrid1.TextMatrix(b, 3)
Text4.Text = MSFlexGrid1.TextMatrix(b, 4)
Text5.Text = MSFlexGrid1.TextMatrix(b, 5)
Text6.Text = MSFlexGrid1.TextMatrix(b, 6)
DTPicker1.Value = MSFlexGrid1.TextMatrix(b, 7)
End Sub
Private Sub Command5_Click()
If Command5.Caption = "删除" Then
Set rs = New Recordset
Dim str As String
str = "select * from " & Trim(a) & " where xh='" & Trim(Text1.Text) & "' and hh='" & Trim(Text2.Text) & "' and hm='" & Trim(Text3.Text) & "'"
Call lian(str, cn, rs)
rs.Delete
rs.Update
MsgBox "删除成功", vbOKOnly, "成功"
ElseIf MSFlexGrid1.TextMatrix(b, c) = Text1.Text Then
Set rs = New Recordset
str = "select * from " & Trim(a) & " where xh='" & Trim(Text1.Text) & "' and hh='" & Trim(Text2.Text) & "' and hm='" & Trim(Text3.Text) & "'"
lian str, cn, rs
rs!xh = txt.Text
rs.Update
MsgBox "修改成功", vbOKOnly, "成功"
ElseIf MSFlexGrid1.TextMatrix(b, c) = Text2.Text Then
Set rs = New Recordset
str = "select * from " & Trim(a) & " where xh='" & Trim(Text1.Text) & "' and hh='" & Trim(Text2.Text) & "' and hm='" & Trim(Text3.Text) & "'"
lian str, cn, rs
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -