Foxtable(狐表)用户栏目专家坐堂 → [求助]输入日期判断


  共有2024人关注过本帖平板打印复制链接

主题:[求助]输入日期判断

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/9/16 21:30:00 [只看该作者]

If e.DataCol.Name = "丝印车间" Then
    If e.NewValue = Nothing Then
        MessageBox.show("当前日期不能为空","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    ElseIf e.NewValue < e.OldValue  Then
        e.Cancel = True
        MessageBox.show("当前日期只能往后填","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    End If
End If

 

或者

 

If e.DataCol.Name = "丝印车间" Then
    Dim da1 As Date = e.NewValue
    If da1 = Nothing Then
        e.Cancel = True
        MessageBox.show("丝印车间日期:" ,"提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Else
        MessageBox.show("丝印车间1","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
        e.Cancel = False
    End If
End If


 回到顶部
总数 11 1 2 下一页