以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  如何停止关闭窗口?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=19735)

--  作者:rjh4078
--  发布时间:2012/5/19 20:59:00
--  如何停止关闭窗口?

我在窗口的beforeclose事件中写入了如下代码  注意红字部分 我的想法是 当用户选择否以后 窗口停止关闭  但是现在似乎不起作用 求高手解答

 

 

If NOT e.Form.Controls("TextBox2").value="" Then
    Tables("客户信息").current.Save()
    Forms("选择客户").DropDownBox.Value = Tables("客户信息").current("客户名称")
   

Else
    If MessageBox.show("客户名称为空确认退出?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question) = DialogResult.Yes Then
       
        Tables("客户信息").current.reject
    Else
        return

    End If
End If


--  作者:yangming
--  发布时间:2012/5/19 22:27:00
--  
e.Cancel = True