我建立了一组check控件,用来进行选择性的查询,不知道怎么来获取那些被选中
,请愿意帮我忙的大哥们给我一个信箱地址我把这个界面发送给你帮我解决一下谢了。请把你的信箱留下我把这个截面发送给你!!!!!
,请愿意帮我忙的大哥们给我一个信箱地址我把这个界面发送给你帮我解决一下谢了。请把你的信箱留下我把这个截面发送给你!!!!!
解决方案 »
- sql 防止同一帐号重复登陆
- 请问各位,我的这个代码错在什么地方了?帮我找一下.谢谢了.
- 如何用弹出的文件对话框来选取一个目录,而且可以选取目录下新建目录
- 搜索代码?
- 怎样修改grdDataGrid所在的记录集中的字段内容? 有答案即结帖!!!
- 小弟要做一个asp+vb(com)+access的三层结构的学生作业管理系统,各位大虾能不能推荐一些例子和资料啊~??谢谢
- 如何控制ActiveBar2.0中调整条(象资源管理器中间那个调整两边大小的东西)的两边大小的限制调整范围﹖
- winsock控件
- 谁愿意告诉我迅速掌握好VB的方法!有分啊!
- 怎么在vb6.0中用api隐藏状态栏中的正在运行的某个程序
- 谁帮我一下很简单的问题: -----
- 如何用代码将MSHFlexGrid的指定行自动滚动到最顶行?
比如:
Dim strTemp As String
If check1.Value Then strTemp = strTemp & " [check1被选中] "
If check2.Value Then strTemp = strTemp & " [check3被选中] "
If check3.Value Then strTemp = strTemp & " [check3被选中] "
If check4.Value Then strTemp = strTemp & " [check4被选中] "
If check5.Value Then strTemp = strTemp & " [check5被选中] "
If strTemp = "" Then
MsgBox "选中情况:" & strTemp
Else
MsgBox "没有选中的Check"
End If
Dim x As Object
For Each x In Me.Controls
If TypeOf x Is CheckBox Then
If x.Value = 1 Then
Y.Add x, x.Name
End If
End If
Next
End Sub
Dim strSql As String
Dim rs As ADODB.Recordset
strSql = " Where 1=1 "
If check品名 Then strSql = strSql + "And 品名='" & txt品名.Text & "' "
If check数量 Then strSql = strSql + "And 数量=" & txt数量.Text
If check成交金额 Then strSql = strSql + "And 成交金额=" & txt成交金额.Text
If check运输方式 Then strSql = strSql + "And 运输方式='" & combo运输方式.Text & "' "
If check商品编码 Then strSql = strSql + "And 商品编码='" & txt商品编码.Text & "' "
If check单价 Then strSql = strSql + "And 单价='" & txt单价.Text & "' "
If check成交方式 Then strSql = strSql + "And 成交方式='" & combo成交方式.Text & "' "
If check收货人 Then strSql = strSql + "And 收货人='" & 收货人.Text & "' "
If check规格 Then strSql = strSql + "And 规格='" & 规格.Text & "' "
If check付款方式 Then strSql = strSql + "And 付款方式='" & 付款方式.Text & "' "
If check发货人 Then strSql = strSql + "And 发货人='" & 发货人.Text & "' "
If check日期 Then strSql = strSql + "And 日期 between '" & Format(dtpStart日期.Value, "yyyy-MM-dd") & "' and '" & Format(dtpStart日期.Value, "yyyy-MM-dd") & "'"
Set rs = New ADODB.Recordset
rs.Open "select * from 发货信息 " & strSql, cn
Set msflexgrid1.DataSource = rs
rs.Close
Set rs = Nothing