以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]开发的软件出错了,求大神解决!  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=101206)

--  作者:hrw68529
--  发布时间:2017/5/26 16:19:00
--  [求助]开发的软件出错了,求大神解决!
出错描述:开发一个软件生成一个发布项目后,在其他电脑上运行正常,但在其中一个电脑上,选择初始日期和结束日期后,查找一个时间段的数据时,出错,如下图,什么问题:
图片点击可在新窗口打开查看此主题相关图片如下:!出错问题2.jpg
图片点击可在新窗口打开查看

--  作者:cd_tdh
--  发布时间:2017/5/26 16:35:00
--  

就是你 窗口Button19,click事件代码问题啊

你把代码贴出来看看

 

DateTime改Date试试

 

[此贴子已经被作者于2017/5/26 16:36:14编辑过]

--  作者:hrw68529
--  发布时间:2017/5/26 16:43:00
--  
Dim Filter As String = "1=1"
With e.Form.Controls("comboBox15")
    If .Value IsNot Nothing Then       
 Filter &= " and 年度 = \'" & .Value & "\'"
    End If
End With

With e.Form.Controls("StarDate")
    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

With e.Form.Controls("comboBox16")
    If .Value IsNot Nothing Then
        Filter &= " and 受伤害职工姓名 = \'" & .Value & "\'"
    End If
End With

If e.Form.Controls("yja1").Checked = True \' 如果付款状态选择了"已付"   
 Filter = Filter & " and 是否结案 = true"
    End If
    
If e.Form.Controls("wja1").Checked = True \' 如果付款状态选择了"未付"  
    Filter = Filter & " and 是否结案 = false"
End If
If e.Form.Controls("ydc1").Checked = True \' 如果付款状态选择了"未付"
    Filter = Filter & " and 是否调查 = True"
End If

If e.Form.Controls("wdc1").Checked = True \' 如果付款状态选择了"未付"   
    Filter = Filter & " and 是否调查 = false"
End If
If e.Form.Controls("fq").Checked = True \' 如果付款状态选择了"未付"
    Filter = Filter & " and 是否放弃 = True"
End If
If e.Form.Controls("wfq").Checked = True \' 如果付款状态选择了"未付" 
    Filter = Filter & " and 是否放弃 = false"
End If

If e.Form.Controls("wt").Checked = True \' 如果付款状态选择了"未付"  
    Filter = Filter & " and 是否委托 = True"
End If

If e.Form.Controls("ysl").Checked = True \' 如果付款状态选择了"未付"   
    Filter = Filter & " and 是否受理 = true"
End If
\'If e.Form.Controls("wsl").Checked = True \' 如果付款状态选择了"未付"   
    \'Filter = Filter & " and 是否受理 = false"
\'End If
If e.Form.Controls("ybz").Checked = True \' 如果付款状态选择了"未付"   
    Filter = Filter & " and 已补正 = true"
End If
If e.Form.Controls("xbz").Checked = True \' 如果付款状态选择了"未付"   
    Filter = Filter & " and 需补正 = true"
End If

\'msgbox(filter)

If Filter > "" Then
    Dim str As String = Tables("工伤认定申请表_table1").DataTable.GetComboListString("_Identify", filter)
    Tables("工伤认定申请表_table1").Filter = "_Identify in (-1," & str.replace("|", ",") & ")"
End If

\'If Filter > "" Then
    \'Tables("工伤认定申请表_table1").Filter = Filter
\'End If
\'
Tables("工伤认定申请表_table1").Sort = "申请时间"

\'
\'\'Dim xm As WinForm.ComboBox = e.Form.Controls("combobox16")
\'\'Tables("工伤认定申请表_table1").Filter="受伤害职工姓名 = \'" & xm.text & "\'"
\'\'
\'Dim Filter As String
\'With e.Form.Controls("comboBox15")
    \'If .Value IsNot Nothing Then
        \'Filter = "年度 = \'" & .Value & "\'"
    \'End If
\'End With
\'
\'With e.Form.Controls("comboBox1")
    \'If .Value IsNot Nothing Then
        \'Filter = "月份 = \'" & .Value & "\'"
    \'End If
\'End With
\'
\'\'With e.Form.Controls("comboBox2")
    \'\'If .Value IsNot Nothing Then
        \'\'Filter = "认定月份 = \'" & .Value & "\'"
    \'\'End If
\'\'End With
\'\'
\'With e.Form.Controls("comboBox16")
    \'If .Value IsNot Nothing Then
        \'Filter = "受伤害职工姓名 = \'" & .Value & "\'"
    \'End If
\'End With
\'
\'If e.Form.Controls("yja1").Checked = True \' 如果付款状态选择了"已付"
    \'If Filter >"" Then
        \'Filter = Filter & " And "
    \'End If
    \'Filter = Filter & "是否结案 = true"
\'End If
\'If e.Form.Controls("wja1").Checked = True \' 如果付款状态选择了"未付"
    \'If Filter >"" Then
        \'Filter = Filter & " And "
    \'End If
    \'Filter = Filter & "是否结案 = false"
\'End If
\'If e.Form.Controls("ydc1").Checked = True \' 如果付款状态选择了"未付"
    \'If Filter >"" Then
        \'Filter = Filter & " And "
    \'End If
    \'Filter = Filter & "是否调查 = True"
\'End If
\'
\'If e.Form.Controls("wdc1").Checked = True \' 如果付款状态选择了"未付"
    \'If Filter >"" Then
        \'Filter = Filter & " And "
    \'End If
    \'Filter = Filter & "是否调查 = false"
\'End If
\'If e.Form.Controls("fq").Checked = True \' 如果付款状态选择了"未付"
    \'If Filter >"" Then
        \'Filter = Filter & " And "
    \'End If
    \'Filter = Filter & "是否放弃 = True"
\'End If
\'If e.Form.Controls("wfq").Checked = True \' 如果付款状态选择了"未付"
    \'If Filter >"" Then
        \'Filter = Filter & " And "
    \'End If
    \'Filter = Filter & "是否放弃 = false"
\'End If
\'
\'If e.Form.Controls("wt").Checked = True \' 如果付款状态选择了"未付"
    \'If Filter >"" Then
        \'Filter = Filter & " And "
    \'End If
    \'Filter = Filter & "是否委托 = True"
\'End If
\'
\'If e.Form.Controls("bsl").Checked = True \' 如果付款状态选择了"未付"
    \'If Filter >"" Then
        \'Filter = Filter & " And "
    \'End If
    \'Filter = Filter & "不受理 = false"
\'End If
\'
\'If Filter > "" Then
    \'Dim str As String = Tables("工伤认定申请表_table1").DataTable.GetComboListString("_Identify", filter)
    \'Tables("工伤认定申请表_table1").Filter = "_Identify in (" & str.replace("|", ",") & ")"
\'End If
\'
\'\'If Filter > "" Then
    \'\'Tables("工伤认定申请表_table1").Filter = Filter
\'\'End If
\'\'
\'Tables("工伤认定申请表_table1").Sort = "申请时间"

--  作者:有点蓝
--  发布时间:2017/5/26 17:48:00
--  
系统日期问题,修改系统日期格式。

或者按这里的方法处理一下