📄 frmddxg.frm
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "ACTSKN43.OCX"
Begin VB.Form frmddxg
BorderStyle = 1 'Fixed Single
Caption = "Form1"
ClientHeight = 4425
ClientLeft = 3225
ClientTop = 2055
ClientWidth = 9240
BeginProperty Font
Name = "幼圆"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4425
ScaleWidth = 9240
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "幼圆"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 6960
TabIndex = 18
Top = 1080
Width = 1695
End
Begin VB.TextBox txttel
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 6960
TabIndex = 14
Top = 360
Width = 1695
End
Begin VB.TextBox txtfname
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 6960
TabIndex = 13
Top = 2520
Width = 1695
End
Begin VB.CommandButton cmdqd
Caption = "确 定"
Height = 495
Left = 1920
TabIndex = 7
Top = 3480
Width = 1215
End
Begin VB.CommandButton cmgqk
Caption = "清 空"
Height = 495
Left = 5760
TabIndex = 6
Top = 3480
Width = 1215
End
Begin VB.TextBox txtno
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2520
TabIndex = 5
Top = 2520
Width = 1695
End
Begin VB.TextBox txtsadd
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 6960
TabIndex = 4
Top = 1800
Width = 1695
End
Begin VB.TextBox txtdx
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2520
TabIndex = 3
Top = 1800
Width = 1695
End
Begin VB.TextBox txtladd
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2520
TabIndex = 2
Top = 1080
Width = 1695
End
Begin VB.TextBox txtname
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2520
TabIndex = 1
Top = 360
Width = 1695
End
Begin VB.TextBox txtid
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3840
TabIndex = 0
Top = 5880
Width = 2895
End
Begin ACTIVESKINLibCtl.Skin Skin1
Left = 1080
OleObjectBlob = "frmddxg.frx":0000
Top = 3360
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel2
Height = 345
Left = 360
OleObjectBlob = "frmddxg.frx":0234
TabIndex = 8
Top = 480
Width = 1695
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel3
Height = 345
Left = 360
OleObjectBlob = "frmddxg.frx":0297
TabIndex = 9
Top = 1200
Width = 1695
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel4
Height = 345
Left = 360
OleObjectBlob = "frmddxg.frx":02FA
TabIndex = 10
Top = 1920
Width = 1695
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel5
Height = 345
Left = 4800
OleObjectBlob = "frmddxg.frx":035D
TabIndex = 11
Top = 1920
Width = 1695
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel6
Height = 345
Left = 4800
OleObjectBlob = "frmddxg.frx":03C0
TabIndex = 12
Top = 2640
Width = 1695
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel1
Height = 345
Left = 4800
OleObjectBlob = "frmddxg.frx":0423
TabIndex = 15
Top = 480
Width = 1695
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel7
Height = 345
Left = 4800
OleObjectBlob = "frmddxg.frx":0486
TabIndex = 16
Top = 1200
Width = 1695
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel9
Height = 345
Left = 360
OleObjectBlob = "frmddxg.frx":04E9
TabIndex = 17
Top = 2640
Width = 1695
End
End
Attribute VB_Name = "frmddxg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As ADODB.Recordset
Dim sql As String
Private Sub cmdqd_Click()
Select Case frmddxg.Caption
Case "添加订单"
If rs.RecordCount <> 0 Then '自动编号
rs.MoveLast
txtid.Text = Format(Right(rs.Fields("订单编号"), 5) + 1, "0####")
Else
txtid.Text = "00001"
End If
If txtname.Text = "" Then
MsgBox "请输入顾客名称!"
Exit Sub
End If
If txtladd = "" Then
MsgBox "请输入顾客地址!"
Exit Sub
End If
If txtsadd = "" Then
MsgBox "请输入送花地址!"
Exit Sub
End If
If txtfname.Text = "" Then
MsgBox "请输入鲜花名称!"
Exit Sub
End If
If txtno.Text = "" Then
MsgBox "请输入鲜花数量!"
Exit Sub
End If
rs.AddNew
rs.Fields("订单编号").Value = txtid.Text
rs.Fields("鲜花名称").Value = txtfname.Text
rs.Fields("送花原因").Value = Combo1.Text
rs.Fields("鲜花数量").Value = txtno.Text
rs.Fields("送花时间").Value = Date
rs.Fields("送花地址").Value = txtsadd
rs.Fields("送花对象").Value = txtdx
rs.Fields("联系电话").Value = txttel
rs.Fields("联系地址").Value = txtladd
rs.Fields("客户姓名").Value = txtname
rs.Update '更新数据
MsgBox "添加成功"
Case "修改订单"
sql = "select * from dingdan where 订单编号='" & txtid.Text & "'"
Set rs = search(sql)
If txtname.Text = "" Then
MsgBox "请输入顾客名称!"
Exit Sub
End If
If txtladd = "" Then
MsgBox "请输入顾客地址!"
Exit Sub
End If
If txtsadd = "" Then
MsgBox "请输入送花地址!"
Exit Sub
End If
If txtfname.Text = "" Then
MsgBox "请输入鲜花名称!"
Exit Sub
End If
If txtno.Text = "" Then
MsgBox "请输入鲜花数量!"
Exit Sub
End If
rs.Fields("订单编号").Value = txtid.Text
rs.Fields("鲜花名称").Value = txtfname.Text
rs.Fields("送花原因").Value = Combo1.Text
rs.Fields("鲜花数量").Value = txtno.Text
rs.Fields("送花时间").Value = Date
rs.Fields("送花地址").Value = txtsadd
rs.Fields("送花对象").Value = txtdx
rs.Fields("联系电话").Value = txttel
rs.Fields("联系地址").Value = txtladd
rs.Fields("客户姓名").Value = txtname
rs.Update '更新保存数据
MsgBox "修改成功"
End Select
End Sub
Private Sub cmgqk_Click()
'清空文本框内容
txtname.Text = ""
txtyy.Text = ""
txtladd.Text = ""
txtsadd.Text = ""
txtfname.Text = ""
txtno.Text = ""
txtdx.Text = ""
txttel.Text = ""
txtname.SetFocus
End Sub
Private Sub Form_Load()
Call showskin(Skin1, hwnd)
'自动加载送花原因
Set rs = search("select distinct 送花原因 from floweryy")
rs.MoveNext
While Not rs.EOF
Combo1.AddItem rs.Fields("送花原因").Value
rs.MoveNext
Wend
Set rs = search("select * from dingdan")
End Sub
Private Sub Txton_KeyPress(KeyAscii As Integer)
'约束文本框输入的内容
If KeyAscii > 47 And KeyAscii < 58 Or KeyAscii = 8 Then
Else
KeyAscii = 0
MsgBox "只能输入数字!"
Txton.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -