Foxtable(狐表)用户栏目专家坐堂 → [求助]筛选出问题


  共有1837人关注过本帖树形打印复制链接

主题:[求助]筛选出问题

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


加好友 发短信
等级:幼狐 帖子:107 积分:850 威望:0 精华:0 注册:2015/5/12 10:19:00
[求助]筛选出问题  发帖心情 Post By:2016/9/2 13:38:00 [只看该作者]

楼主:

现在新设了一个窗口,用于筛选信息,命令如下:

Dim Filter As String
Dim dst As Table=Tables("历年绩效数据库")
With e.Form.Controls("TextBox2")
    If .Value IsNot Nothing Then
        Filter = "姓名= '" & .Value & "'"
     End If
End With
With e.Form.Controls("TextBox1")
    If .Value IsNot Nothing Then
        Filter = "工号= '" & .Value & "'"
End If
   End With
With e.Form.Controls("StartDate")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "日期 >= #" & .Value & "#"
      End If
End With
With e.Form.Controls("EndDate")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "日期<= #" & .Value & "#"
    End If
End With

If Filter > "" Then
    Tables("历年绩效数据库").Filter = Filter
End If

 

 

c出现如下错误:

该字符串未被识别为有效的 DateTime。有一个从索引 9 处开始的未知字。

怎么调整都不行!楼主指点指点


 回到顶部
帅哥哟,离线,有人找我吗?
狐狸爸爸
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47480 积分:251289 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2016/9/2 14:53:00 [只看该作者]

检查一下控制面板的日期时间格式设置,其中短日期格式通常应该为: yyyy-MM-dd

 回到顶部