📄 form5.frm
字号:
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.Label Label65
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = ">>缺货清单<<"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 210
Left = 120
TabIndex = 3
Top = 240
Width = 1260
End
End
Begin VB.Label Label1
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "::::::表初始化::::::"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 210
Left = 360
TabIndex = 4
Top = 1080
Width = 2100
End
Begin VB.Label Label64
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "::::::缺物提示::::::"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 210
Left = 360
TabIndex = 0
Top = 720
Width = 2100
End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Check1.Value = 0 And Check2.Value = 0 And Check3.Value = 0 And Check4.Value = 0 And Check5.Value = 0 And Check6.Value = 0 And Check7.Value = 0 And Check9.Value = 0 And Check10.Value = 0 And Check11.Value = 0 Then
MsgBox "您没选择要初始化的表!!"
Exit Sub
End If
Dim workarea(500)
Dim Counter
a = MsgBox("此操作数据不可恢复,您确定初始化吗?!", vbYesNo, "警示!")
If a = vbNo Then
Command1.Enabled = True
Exit Sub
End If
Command1.Enabled = False
Label3.Visible = True
Label3.Caption = "正在初使化......"
ProgressBar1.Visible = True
ProgressBar1.Max = UBound(workarea)
ProgressBar1.Value = ProgressBar1.Min
For Counter = LBound(workarea) To UBound(workarea)
workarea(Counter) = "initial value " & Counter
ProgressBar1.Value = Counter
If Check1.Value = 1 Then
Adodc1.RecordSource = "SELECT * FROM 用户表"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
End If
End If
If Check2.Value = 1 Then
Adodc1.RecordSource = "SELECT * FROM 职员表"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
End If
End If
If Check3.Value = 1 Then
Adodc1.RecordSource = "SELECT * FROM 客户表"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
End If
End If
If Check4.Value = 1 Then
Adodc1.RecordSource = "SELECT * FROM 意见表"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
End If
End If
If Check5.Value = 1 Then
Adodc1.RecordSource = "SELECT * FROM 货存表"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
End If
End If
If Check6.Value = 1 Then
Adodc1.RecordSource = "SELECT * FROM 销售临时表"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
End If
End If
If Check7.Value = 1 Then
Adodc1.RecordSource = "SELECT * FROM 要求表"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
End If
End If
If Check9.Value = 1 Then
Adodc1.RecordSource = "SELECT * FROM 统计表"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
End If
End If
If Check10.Value = 1 Then
Adodc1.RecordSource = "SELECT * FROM 利润表"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
End If
End If
If Check11.Value = 1 Then
Adodc1.RecordSource = "SELECT * FROM 交易表"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
End If
End If
Next Counter
Label3.Caption = "初始化完毕!!"
Check1.Value = 0
Check2.Value = 0
Check3.Value = 0
Check4.Value = 0
Check5.Value = 0
Check6.Value = 0
Check7.Value = 0
Check9.Value = 0
Check10.Value = 0
Check11.Value = 0
'ProgressBar1.Visible = False
Command1.Enabled = True
'ProgressBar1.Value = ProgressBar1.Min
Exit Sub
'MDIForm1.Show
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=管理系统"
Form5.Top = 0
Form5.Left = 0
Form5.Width = Me.Width
Form5.Height = Me.Height
Frame19.Left = 3360
Frame19.Height = 6615
Frame19.Top = 440
Frame19.Width = 8415
Frame1.Left = 4320
Frame1.Height = 4335
Frame1.Top = 1080
Frame1.Width = 6135
End Sub
Private Sub Label1_Click()
If Form2.qx = "普通用户" Then
MsgBox "你是普通用户,不能对任何表进行初始化!!"
Exit Sub
End If
Frame19.Visible = False
Frame1.Visible = True
End Sub
Private Sub Label64_Click()
Frame19.Visible = True
Frame1.Visible = False
Adodc1.RecordSource = "SELECT * FROM 货存表 where 数量= 0"
Adodc1.Refresh
Set DataGrid2.DataSource = Adodc1
Frame19.Visible = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -