📄 frm_jhgl_scjhd.frm
字号:
Width = 420
End
Begin VB.Label Label5
Caption = "计量单位"
Height = 195
Left = 4065
TabIndex = 8
Top = 585
Width = 735
End
Begin VB.Label Label4
Caption = "产品规格"
Height = 195
Left = 2100
TabIndex = 7
Top = 585
Width = 765
End
Begin VB.Label Label3
Caption = "产品名称"
Height = 180
Left = 105
TabIndex = 6
Top = 570
Width = 795
End
Begin VB.Label Label2
Caption = "产品编号"
Height = 210
Left = 3630
TabIndex = 5
Top = 240
Width = 750
End
Begin VB.Label Label1
Caption = "生产计划单编号"
Height = 195
Left = 90
TabIndex = 3
Top = 240
Width = 1275
End
End
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 705
Left = 0
TabIndex = 0
Top = 0
Width = 7725
_ExtentX = 13626
_ExtentY = 1244
ButtonWidth = 1138
ButtonHeight = 1191
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 13
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = " 增加 "
Key = "add"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "修改"
Key = "modify"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "删除"
Key = "delete"
ImageIndex = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "保存"
Key = "save"
ImageIndex = 4
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "取消"
Key = "cancel"
ImageIndex = 5
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "查找"
Key = "find"
ImageIndex = 6
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "第一条"
Key = "first"
ImageIndex = 7
EndProperty
BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "上一条"
Key = "previous"
ImageIndex = 8
EndProperty
BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "下一条"
Key = "next"
ImageIndex = 9
EndProperty
BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "末一条"
Key = "last"
ImageIndex = 10
EndProperty
BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Style = 3
EndProperty
BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "关闭"
Key = "close"
ImageIndex = 11
EndProperty
EndProperty
BorderStyle = 1
End
Begin MSComctlLib.ImageList ImageList1
Left = -240
Top = 675
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 26
ImageHeight = 26
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 11
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Jhgl_Scjhd.frx":0057
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Jhgl_Scjhd.frx":16B1
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Jhgl_Scjhd.frx":2D0B
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Jhgl_Scjhd.frx":4365
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Jhgl_Scjhd.frx":59BF
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Jhgl_Scjhd.frx":7019
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Jhgl_Scjhd.frx":8673
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Jhgl_Scjhd.frx":9CCD
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Jhgl_Scjhd.frx":B327
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Jhgl_Scjhd.frx":C981
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Jhgl_Scjhd.frx":DFDB
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "Frm_Jhgl_Scjhd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer, Myval As Integer '定义整型变量
Public blnadd1 As Boolean
Dim Mystr As String '定义字符变量存储编号信息
Dim Str1 As String
Dim Str2 As String '定义字符变量
Dim StrTemp As String
Dim rs3 As New ADODB.Recordset
Sub view_data() '定义显示数据的过程
If Adodc1.Recordset.RecordCount > 0 Then
With Dgr_Scjhd
If .Columns(0) <> "" Then Text1(0).Text = .Columns(0) Else Text1(0).Text = ""
If .Columns(1) <> "" Then Cbx_Cpbh.Text = .Columns(1) Else Cbx_Cpbh.Text = ""
If .Columns(2) <> "" Then Text1(1).Text = .Columns(2) Else Text1(1).Text = ""
If .Columns(3) <> "" Then Text1(2).Text = .Columns(3) Else Text1(2).Text = ""
If .Columns(4) <> "" Then Text1(3).Text = .Columns(4) Else Text1(3).Text = ""
If .Columns(5) <> "" Then Text1(4).Text = .Columns(5) Else Text1(4).Text = ""
If .Columns(6) <> "" Then Dtp_Tcrq.Value = .Columns(6) Else Dtp_Tcrq.Value = Date
If .Columns(7) <> "" Then Dtp_Wgrq.Value = .Columns(7) Else Dtp_Wgrq.Value = Date
If .Columns(8) <> "" Then Cbx_wcf.Text = .Columns(8) Else Cbx_wcf.Text = ""
If .Columns(9) <> "" Then Text1(5).Text = .Columns(9) Else Text1(5).Text = ""
End With
End If
End Sub
Private Sub Cbx_Cpbh_Change()
rs3.Open "select * from tb_SCGL_cpxx where cpxx_id ='" + Cbx_Cpbh.Text + "'", cnn, adOpenKeyset
If rs3.RecordCount > 0 Then
For i = 1 To 3
If rs3.Fields(i) <> "" Then
Text1(i).Text = rs3.Fields(i)
Else
Text1(i).Text = ""
End If
Next i
End If
rs3.Close
End Sub
Private Sub Cbx_Cpbh_Click()
rs3.Open "select * from tb_SCGL_cpxx where cpxx_id ='" + Cbx_Cpbh.Text + "'", cnn, adOpenKeyset
If rs3.RecordCount > 0 Then
For i = 1 To 3
If rs3.Fields(i) <> "" Then
Text1(i).Text = rs3.Fields(i)
Else
Text1(i).Text = ""
End If
Next i
End If
rs3.Close
End Sub
Private Sub Cbx_Cpbh_GotFocus()
Cbx_Cpbh.BackColor = &HFFFF80
End Sub
Private Sub Cbx_Cpbh_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Text1(4).SetFocus
End Sub
Private Sub Cbx_Cpbh_LostFocus()
Cbx_Cpbh.BackColor = &HFFFFFF
Dim rs4 As New ADODB.Recordset
rs4.Open "select * from tb_SCGL_cpxx where cpxx_id='" + Cbx_Cpbh.Text + "'", cnn, adOpenKeyset
If rs4.RecordCount <= 0 Then
MsgBox "该产品不是本公司生产的!请确认后重新输入!", , "信息提示"
Cbx_Cpbh.SetFocus
Cbx_Cpbh.ListIndex = 0
End If
rs3.Open "select * from tb_SCGL_cpxx where cpxx_id ='" + Cbx_Cpbh.Text + "'", cnn, adOpenKeyset
If rs3.RecordCount > 0 Then
For i = 1 To 3
If rs3.Fields(i) <> "" Then
Text1(i).Text = rs3.Fields(i)
Else
Text1(i).Text = ""
End If
Next i
End If
rs3.Close
End Sub
Private Sub Cbx_wcf_GotFocus()
Cbx_wcf.BackColor = &HFFFF80
End Sub
Private Sub Cbx_wcf_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Text1(5).SetFocus
End Sub
Private Sub Cbx_wcf_LostFocus()
Cbx_wcf.BackColor = &HFFFFFF
End Sub
Private Sub Dgr_Scjhd_Click()
view_data
End Sub
Private Sub Dtp_Tcrq_GotFocus()
Dtp_Tcrq.CalendarBackColor = &HFFFF80
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -