以下是引用yuansq在2009-3-13 14:09:00的发言:
误会了 呵呵 我以为你是自己做了一个窗口代替系统的messagebox呢
Messagebox.Show("请 检查 项目是否正确!", "提示",MessageBoxButtons.OK)
是我没有给全,后面跟着我设计的窗口:
Forms("项目").Show() 可能里面代码有问题。
1。textchanged:e.Sender.WriteValue()
2。click事件代码:
If Forms("项目").Controls("combobox1").text is nothing then
e.Form.Controls("combobox1").Value = nothing
end if
3。leave事件代码:
If Tables("表A").Current.isnull("项目") orelse Forms("项目").Controls("combobox1").text is nothing then
Messagebox.Show("请选择项目!", "提示",MessageBoxButtons.OK)
e.Form.Controls("ComboBox1").Select()
End If