📄 frmrecstore.frm
字号:
VERSION 5.00
Begin VB.Form frmRecStore
BorderStyle = 3 'Fixed Dialog
Caption = "库存轧账"
ClientHeight = 3315
ClientLeft = 45
ClientTop = 330
ClientWidth = 4755
Icon = "frmRecStore.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3315
ScaleWidth = 4755
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.TextBox txtLog
BackColor = &H80000018&
Height = 1680
Left = 660
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 4
Top = 675
Width = 3405
End
Begin VB.TextBox txtDate
BackColor = &H80000018&
Height = 315
Left = 1605
TabIndex = 3
Top = 210
Width = 2265
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 465
Left = 2295
TabIndex = 2
Top = 2565
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "开始"
Height = 465
Left = 810
TabIndex = 1
Top = 2550
Width = 1335
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "日期"
Height = 180
Left = 870
TabIndex = 0
Top = 300
Width = 360
End
End
Attribute VB_Name = "frmRecStore"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
On Error GoTo MyErr
Cmd.ActiveConnection = Conn
txtLog.Text = txtLog.Text & vbCrLf & "正在保存分店库存数据..."
sSQL = "delete from RecChainStore where 日期='" & Format(Now, "yyyy-mm-dd") & "'"
Cmd.CommandText = sSQL
Cmd.Execute
sSQL = "insert into RecChainStore select '1988-01-01',a.* from 分店库存 as a"
Cmd.CommandText = sSQL
Cmd.Execute
sSQL = "update RecChainStore set 日期='" & Format(Now, "yyyy-mm-dd") & "' where 日期= '1988-01-01'"
Cmd.CommandText = sSQL
Cmd.Execute
txtLog.Text = txtLog.Text & vbCrLf & "成功保存分店库存数据!"
txtLog.Text = txtLog.Text & vbCrLf & "正在保存配送中心库存数据..."
sSQL = "delete from RecMainStore where 日期='" & Format(Now, "yyyy-mm-dd") & "'"
Cmd.CommandText = sSQL
Cmd.Execute
sSQL = "insert into RecMainStore select '1988-01-01',a.* from 配送中心库存 as a"
Cmd.CommandText = sSQL
Cmd.Execute
sSQL = "update RecMainStore set 日期='" & Format(Now, "yyyy-mm-dd") & "' where 日期= '1988-01-01'"
Cmd.CommandText = sSQL
Cmd.Execute
txtLog.Text = txtLog.Text & vbCrLf & "成功保存配送中心库存数据!"
Exit Sub
MyErr:
txtLog.Text = txtLog.Text & vbCrLf & "保存库存数据失败!"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
txtDate.Text = Format(Now, "yyyy-mm-dd")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -