📄 frm_checkedit.frm
字号:
VERSION 5.00
Begin VB.Form frm_checkedit
BorderStyle = 1 'Fixed Single
Caption = "库存数量修改"
ClientHeight = 3900
ClientLeft = 5580
ClientTop = 3360
ClientWidth = 4710
Icon = "frm_checkedit.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
ScaleHeight = 3900
ScaleWidth = 4710
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 2640
TabIndex = 7
Top = 3240
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 960
TabIndex = 6
Top = 3240
Width = 975
End
Begin VB.TextBox Text1
Height = 375
Left = 2400
TabIndex = 5
Top = 2040
Width = 1215
End
Begin VB.Label Label5
Caption = "盘点数量"
Height = 615
Left = 600
TabIndex = 4
Top = 2040
Width = 975
End
Begin VB.Label Label4
Height = 735
Left = 2400
TabIndex = 3
Top = 1200
Width = 1215
End
Begin VB.Label Label3
Caption = "库存数量"
Height = 735
Left = 600
TabIndex = 2
Top = 1080
Width = 855
End
Begin VB.Label Label2
Height = 735
Left = 2400
TabIndex = 1
Top = 120
Width = 1095
End
Begin VB.Label Label1
Caption = "教材名"
Height = 615
Left = 600
TabIndex = 0
Top = 240
Width = 1095
End
End
Attribute VB_Name = "frm_checkedit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim cncer1 As ADODB.Connection
Dim rscer1 As ADODB.Recordset
Dim Trim1 As String
Private Sub Command1_Click()
Trim1 = Trim(Text1.Text)
If Trim1 = "" Then
MsgBox "请输入数据!", vbOKOnly, "警告"
Text1.SetFocus
Exit Sub
End If
rscer1!教材数量 = Text1.Text
rscer1.Update
Unload Me
MsgBox "修改成功!", vbOKOnly
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Set cncer1 = New ADODB.Connection
Set rscer1 = New ADODB.Recordset
cncer1.ConnectionString = "FileDSN=通用教材管理系统.dsn;UID=sa;PWD="
cncer1.Open
rscer1.CursorLocation = adUseClient
rscer1.Open "select * from 教材表 where id= '" & str1 & "'", cncer1, adOpenDynamic, adLockOptimistic, adCmdText
Label2.Caption = rscer1.Fields(0)
Label4.Caption = rscer1.Fields(4)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set cncer1 = Nothing
Set rscer1 = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -