📄 frmchukugl.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Frmchukugl
BackColor = &H0080FF80&
Caption = "出库数据库管理"
ClientHeight = 4290
ClientLeft = 60
ClientTop = 345
ClientWidth = 6735
FillColor = &H0080FF80&
LinkTopic = "Form2"
ScaleHeight = 4290
ScaleWidth = 6735
StartUpPosition = 2 '屏幕中心
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 1200
Top = 7425
Width = 3375
_ExtentX = 5953
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=wei"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=wei"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "qcml"
Caption = "Adodc2"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 5400
Top = 7560
Width = 3375
_ExtentX = 5953
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=wei"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=wei"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select qcdm,mc from qcml"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "Frmchukugl.frx":0000
Height = 1935
Left = 840
TabIndex = 7
Top = 2280
Width = 5295
_ExtentX = 9340
_ExtentY = 3413
_Version = 393216
AllowUpdate = 0 'False
AllowArrows = 0 'False
Enabled = 0 'False
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.CommandButton Command5
BackColor = &H0000FFFF&
Caption = "查询"
Height = 375
Left = 5280
TabIndex = 6
Top = 720
Width = 855
End
Begin VB.CommandButton Command2
Caption = "查询"
Height = 375
Left = 5280
TabIndex = 5
Top = 1440
Width = 855
End
Begin VB.TextBox Text2
Height = 375
Left = 3000
TabIndex = 4
Top = 1440
Width = 1815
End
Begin VB.TextBox Text1
Height = 375
Left = 3000
TabIndex = 3
Top = 720
Width = 1815
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "按器材名称查询"
BeginProperty Font
Name = "新宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 720
TabIndex = 2
Top = 1560
Width = 1815
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "按器材代码查询"
BeginProperty Font
Name = "新宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 720
TabIndex = 1
Top = 840
Width = 1815
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "出库数据查询"
BeginProperty Font
Name = "隶书"
Size = 24
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 735
Left = 1320
TabIndex = 0
Top = 120
Width = 5895
End
End
Attribute VB_Name = "Frmchukugl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim rs_findqc As New ADODB.Recordset
Dim sq As String
If Check1.Value = vbChecked Then
sq = "qcdm= '" & Trim(Text1.Text & " ") & "'"
End If
If Check2.Value = vbChecked Then
sq = "mc='" & Trim(Text2.Text & " ") & "'"
End If
If Trim(sq) = "" Then
MsgBox "请选择查询方式!", vbOKOnly + vbExclamation
Exit Sub
End If
Adodc1.Refresh
DataGrid.ReBind
End Sub
Private Sub Command3_Click()
Frmchukugl2.Show
Dim num As String
Dim re_num As Integer
Dim sq As String
On Error GoTo finderror
re_num = 0
num = InputBox$("请输入要查询器材代码,名称")
sq = "select qcdm,mc from qcml"
Set rs1 = db.openrecordset(sql, dbopendynaset) '
sq_search = "select qcdm,mc from qcml"
If num <> "" Then
End Sub
Private Sub Command4_Click()
Dim cn As New ADODB.Connection '定义连接对象
Dim rs As New ADODB.Recordset '定义记录集对象
Dim cmd As New ADODB.Command '定义查询对象
cmd.CommandText = "Select * from qcml"
Dim strCnn As String '定义字符串变量
strCnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=wei"
Set cn = New ADODB.Connection
cn.Open strCnn
cmd.ActiveConnection = cn
Set rs = cmd.Execute
rs.MoveFirst
Do While Not rs.EOF()
Print rs!mc, rs!kcsl
rs.MoveNext
Loop
rs.Close
cn.Close
End Sub
Private Sub Combo1_Change()
End Sub
Private Sub Command2_Click()
Dim cn As New ADODB.Connection '定义连接对象
Frmchukugl2.Show
Dim rs As New ADODB.Recordset '定义记录集对象
Dim strCnn As String '定义字符串变量
strCnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=wei"
Set cn = New ADODB.Connection
cn.Open strCnn
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.CursorType = adOpenStatic
rs.LockType = adLockBatchOptimistic
rs.Open "select * from qcml where mc='" & Text2.Text & "'", cn, , , 0
If (rs.BOF And rs.EOF) Then
MsgBox ("请输入数据无此数据!")
'Unload Me
Exit Sub
End If
With Frmchukugl2
.Text1.Text = rs.Fields(0)
.Text2.Text = rs.Fields(1)
.Text3.Text = rs.Fields(2)
.Text4.Text = rs.Fields(3)
.Text5.Text = rs.Fields(4) & ""
.Text6.Text = rs.Fields(5) & ""
.Text7.Text = rs.Fields(6) & ""
.Text8.Text = rs.Fields(9) & ""
.Text9.Text = rs.Fields(8) & ""
.Text10.Text = rs.Fields(10) & ""
.Text11.Text = rs.Fields(7) & ""
End With
rs.Close
cn.Close
End Sub
Private Sub Command5_Click()
Dim cn As New ADODB.Connection '定义连接对象
Frmchukugl2.Show
Dim rs As New ADODB.Recordset '定义记录集对象
Dim strCnn As String '定义字符串变量
strCnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=wei"
Set cn = New ADODB.Connection
cn.Open strCnn
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.CursorType = adOpenStatic
rs.LockType = adLockBatchOptimistic
rs.Open "select * from qcml where qcdm='" & Text1.Text & "'", cn, , , 0
If (rs.BOF And rs.EOF) Then
MsgBox ("请输入数据!")
'Unload Me
Exit Sub
End If
With Frmchukugl2
.Text1.Text = rs.Fields(0)
.Text2.Text = rs.Fields(1)
.Text3.Text = rs.Fields(2)
.Text4.Text = rs.Fields(3)
.Text5.Text = rs.Fields(4) & ""
.Text6.Text = rs.Fields(5) & ""
.Text7.Text = rs.Fields(6) & ""
.Text8.Text = rs.Fields(9) & ""
.Text9.Text = rs.Fields(8) & ""
.Text10.Text = rs.Fields(10) & ""
.Text11.Text = rs.Fields(7) & ""
End With
' Text1(2).Text = rs.Fields(2)
rs.Close
cn.Close
End Sub
Private Sub Command6_Click()
Frmchukugl2.Show
End Sub
Private Sub Form_Load()
Dim i As Integer
Dim sql As String
' Adodc2.Recordset.MoveFirst
'For i = 0 To Adodc2.Recordset.RecordCount - 1
'Adodc2.Recordset.MoveNext
'Next
'cono1.ListIndex = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -