在订单表新增一条记录,订单编号字段如果不输入,直接回车后,如下这段代码为何是无效的呢?
If e.DataCol.Name = "订单号" Then If e.NewValue Is Nothing Then MessageBox.Show("订单号不允许为空!") e.Cancel = True End IfEnd If