Foxtable(狐表)用户栏目专家坐堂 → [求助]查询


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

主题:[求助]查询

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


加好友 发短信
等级:婴狐 帖子:15 积分:170 威望:0 精华:0 注册:2017/6/22 20:51:00
[求助]查询  发帖心情 Post By:2017/6/23 20:09:00 [只看该作者]

请问错在哪里。

这是错误提示(无法将类型为“Foxtable.WinForm.RadioButton”的对象强制转换为类型“Foxtable.WinForm.ComboBox”。

这是查询代码Dim cmb1 As WinForm.ComboBox = e.Form.Controls("radweixian")
Dim cmb2 As WinForm.ComboBox = e.Form.Controls("raddanwei")
If e.Form.Controls("radweixian").Checked = True
    Dim Filter As String = ""
    With e.Form.Controls("radweixian")
        If .Value IsNot Nothing Then
            Filter = "危险级别= '" & .Value & "'"
        End If
    End With
    With e.Form.Controls("Comliebie")
        If .Value IsNot Nothing Then
            If Filter > "" Then
                Filter = Filter & " And "
            End If
            Filter = Filter & "bh= '" & .Value & "'"
        End If
    End With
ElseIf e.Form.Controls("raddanwei").Checked = True

    Dim Filter As String = ""
    With e.Form.Controls("Comliebie")
        If .Value IsNot Nothing Then
            Filter = "wzmc= '" & .Value & "'"
        End If
    End With
    With e.Form.Controls("Comliebie")
        If .Value IsNot Nothing Then
            If Filter > "" Then
                Filter = Filter & " And "
            End If
            Filter = Filter & "bh= '" & .Value & "'"
        End If
    End With

End If


 回到顶部