以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  请问这是什么原因引起  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=86637)

--  作者:kmzb56
--  发布时间:2016/6/22 12:40:00
--  请问这是什么原因引起

图片点击可在新窗口打开查看此主题相关图片如下:2)c%`qeqm)qet`04lm}uuv.png
图片点击可在新窗口打开查看

点下拉列表出错,请问是什么原因?如果没按查询不会出错,按了查询就会出错。

--  作者:大红袍
--  发布时间:2016/6/22 14:31:00
--  
 贴出代码,上传实例说明问题。
--  作者:kmzb56
--  发布时间:2016/6/22 15:20:00
--  
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.ArgumentNullException: 值不能为空。
参数名: key
   在 System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   在 System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   在 System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   在 System.Data.DataView.System.Collections.IList.get_Item(Int32 recordIndex)
   在 System.Windows.Forms.BindingSource.get_Item(Int32 index)
   在 ??.?.??(Int32 row)
   在 C1.Win.C1FlexGrid.Row.get_DataSource()
   在 C1.Win.C1FlexGrid.C1FlexGridBase.?(Int32 row, Int32 col)
   在 ??.??.?(MouseEventArgs e, Int32 row, Int32 col)
   在 ??.??.?(MouseEventArgs e)
   在 C1.Win.C1FlexGrid.C1FlexGridBase.OnMouseMove(MouseEventArgs e)
   在 System.Windows.Forms.Control.WmMouseMove(Message& m)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 C1.Win.C1FlexGrid.Util.BaseControls.ScrollableControl.WndProc(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** 已加载的程序集 **************
mscorlib
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.5485 (Win7SP1GDR.050727-5400)
    基本代码: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。


--  作者:大红袍
--  发布时间:2016/6/22 15:38:00
--  
你查询按钮和下拉控件,分别写了什么代码?贴出来。
--  作者:kmzb56
--  发布时间:2016/6/23 11:48:00
--  
Dim Filter As String
With e.Form.Controls("ComboBox1")
If .value IsNot Nothing Then
     Filter="状态 like \'*" & .Value & "*\'"
    End If
End With


With e.Form.Controls("comkehu") 
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "客户名称 like  \'*" & .Value & "*\'"
    End If
End With

With e.Form.Controls("comhuowu") 
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "运货名称 like  \'*" & .Value & "*\'"
    End If
End With
With e.Form.Controls("commudi")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter  & "目的地 like \'*" & .Value & "*\'"
    End If
End With
With e.Form.Controls("Dateqishi")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "发货日期 >= #" & .Value & "#"
    End If
End With
With e.Form.Controls("Datejiesu")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "发货日期 <= #" & .Value & "#"
    End If
End With
If Filter > "" Then
    Tables("任务查询_Table1").Filter = Filter
End If

--  作者:大红袍
--  发布时间:2016/6/23 11:55:00
--  
代码没问题,上传实例说明问题。