主题:一个星期贴完自己写的药品进销存管理软件(六)
'文件名:dlokfrm.frm
'用于确认其登录的仓库名称及当前系统日期
'软件采用的是多仓库管理方式
Dim unok As Boolean
Private Sub Command1_Click()
If Combo1.ListCount = 0 Then
unok = True
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(8) = True
Form1.Show 1
MsgBox "新增仓库后请重新打开软件", vbOKOnly + vbInformation, "退出"
End
ElseIf Combo1.Text <> "" Then
CkName = Combo1.Text
unok = True
frmMain.SBar1.Panels(4).Text = CkName
frmMain.List1.Clear
For i = 0 To Combo1.ListCount - 1
frmMain.List1.AddItem Combo1.List(i)
Next i
Unload Me
End If
End Sub
Private Sub Form_Load()
On Error Resume Next
DataRedSet.Close
DataRedSet.Open "select * from cangk ", DataCon
Do While Not DataRedSet.EOF
Combo1.AddItem Trim(DataRedSet.Fields(1))
DataRedSet.MoveNext
Loop
DataRedSet.Close
End Sub
Private Sub Form_Unload(Cancel As Integer)
If unok = True Then
Unload Me
Else
Cancel = -1
End If
End Sub
'用于确认其登录的仓库名称及当前系统日期
'软件采用的是多仓库管理方式
Dim unok As Boolean
Private Sub Command1_Click()
If Combo1.ListCount = 0 Then
unok = True
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(8) = True
Form1.Show 1
MsgBox "新增仓库后请重新打开软件", vbOKOnly + vbInformation, "退出"
End
ElseIf Combo1.Text <> "" Then
CkName = Combo1.Text
unok = True
frmMain.SBar1.Panels(4).Text = CkName
frmMain.List1.Clear
For i = 0 To Combo1.ListCount - 1
frmMain.List1.AddItem Combo1.List(i)
Next i
Unload Me
End If
End Sub
Private Sub Form_Load()
On Error Resume Next
DataRedSet.Close
DataRedSet.Open "select * from cangk ", DataCon
Do While Not DataRedSet.EOF
Combo1.AddItem Trim(DataRedSet.Fields(1))
DataRedSet.MoveNext
Loop
DataRedSet.Close
End Sub
Private Sub Form_Unload(Cancel As Integer)
If unok = True Then
Unload Me
Else
Cancel = -1
End If
End Sub