📄 frmyanzheng.frm
字号:
VERSION 5.00
Begin VB.Form frmyanzheng
BorderStyle = 3 'Fixed Dialog
Caption = "验证编号"
ClientHeight = 1035
ClientLeft = 45
ClientTop = 435
ClientWidth = 6150
Icon = "frmyanzheng.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1035
ScaleWidth = 6150
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton cmdcancel
Caption = "取消(&C)"
Height = 375
Left = 4440
TabIndex = 2
Top = 480
Width = 1455
End
Begin VB.CommandButton cmdok
Caption = "确定(&O)"
Height = 375
Left = 2760
TabIndex = 1
Top = 480
Width = 1455
End
Begin VB.TextBox txtyanzheng
Height = 375
Left = 240
TabIndex = 0
Top = 480
Width = 2295
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "请输入您想要添加的货品信息编号,以确定数据库内不会重复:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 3
Top = 120
Width = 5670
End
End
Attribute VB_Name = "frmyanzheng"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdcancel_Click()
Unload Me
End Sub
Private Sub cmdok_Click() '验证货物
Dim rs As New ADODB.Recordset
Dim sql As String
sql = "select " & HUOPIN_TABLE_STR1 & " from Huopin where hNo='" & Trim(txtyanzheng.Text) & "'" 'HUOPIN_TABLE_STR是字段列表
rs.open sql, cn, adOpenDynamic, adLockOptimistic
If rs.RecordCount > 0 Then
If MsgBox("已经存在编号[" & Trim(txtyanzheng.Text) & "]的货物,如果确实需要输入,请选择进货单。", vbOKCancel + vbInformation, "信息提示") = vbCancel Then
Unload Me
Else
Unload Me
frmjinhuo.Show 1
Exit Sub
End If
End If
If Trim(txtyanzheng.Text) = "" Then
MsgBox "请输入验证编号内容!", 48, "信息提示"
Exit Sub
End If
MsgBox "数据库内不存在该货品信息,可以输入。", 48, "信息提示"
Unload Me
frmaddhuo.Show 1
End Sub
Private Sub txtyanzheng_KeyPress(KeyAscii As Integer)
If Trim(txtyanzheng.Text) <> "" And KeyAscii = 13 Then
cmdok_Click
Exit Sub
End If
If Trim(txtyanzheng.Text) = "" And KeyAscii = 13 Then
MsgBox "请输入验证编号内容!", 48, "信息提示"
txtyanzheng.SetFocus
Exit Sub
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -