叫人如何跟你解释清楚呢?这样好了,你试试吧,如果不是你预想的顺序,就调整等号二边的参数.
Private Sub O_1_Click()
x = Dir("c:\fox_sys\dept.txt")
y = Dir("c:\fox_sys\dept1.txt")
z = Dir("c:\fox_sys\dept2.txt")
w = Dir("C:\foy_sys\dept3.txt")
If x = "dept.txt" And z = "dept2.txt" Then
DoCmd.OpenForm "未核銷情況(壹部)"
ElseIf x = "dept.txt" And y = "dept1.txt" Then
DoCmd.OpenForm "未核銷情況(貳部)"
Elseif x <> "dept.txt" And y <> "dept1.txt" And z <> "dept2.txt" Then
MsgBox "系統退出!", "16", "系統"
DoCmd.Quit
end if
End sub
[此贴子已经被作者于2006-2-27 20:05:14编辑过]
|