Office中国论坛/Access中国论坛

标题: 下面的代码怎样改!才能真的退出access [打印本页]

作者: gxy1000    时间: 2011-5-28 09:12
标题: 下面的代码怎样改!才能真的退出access
下面的代码怎样改!才能退出access:
下面的代码只能关闭主界面!!各位师傅帮帮忙!
Private Sub ctListBar0_ItemClick(ByVal nList As Integer, ByVal nItem As Integer)
Dim strArgument As String
    strArgument = ctListBar0.ItemText(nList, nItem)
    Select Case strArgument
    Case "计算器"
         Dim stAppName As String
         stAppName = "calc.exe"
         Call Shell(stAppName, 1)
    Case "发货查询"
         DoCmd.OpenForm "窗体1"
    Case "支付查询"
         DoCmd.OpenForm "窗体2"
    Case "退出系统"
         DoCmd.Close acForm, Me.Name
    Case Else
    End Select
End Sub


作者: lsh325    时间: 2011-5-28 09:15
学习学习,待高人
作者: gxy1000    时间: 2011-5-28 09:28
解决了!!论坛里找到了!!!Case "退出系统"
         Case "退出系统"
                Quit

  
   
作者: pwj2009    时间: 2011-5-28 10:00
这个很简单啊。DoCmd.Quit         
Quit 是退出整个ACCESS
colse是退出窗体!




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3