在一个窗口中建立一个多选框,主要包括:
多选框Check1日期 从text1到text2
多选框Check2名称TEXT3
多选框Check3用途TEXT4
多选框Check4经手人text5
多选框Check5领用人text6
多选框Check6备注text7
单击commond1打开另一个窗口form4
在form4中的dbgird显示查询的结果请帮帮忙写出具体步骤,还要添加什么控件
我对VB不是学得很好
在线等
多选框Check1日期 从text1到text2
多选框Check2名称TEXT3
多选框Check3用途TEXT4
多选框Check4经手人text5
多选框Check5领用人text6
多选框Check6备注text7
单击commond1打开另一个窗口form4
在form4中的dbgird显示查询的结果请帮帮忙写出具体步骤,还要添加什么控件
我对VB不是学得很好
在线等
解决方案 »
- 未找到方法和数据库成员
- 如何用VB给已存在的EXCEL文件加上宏代码,而且必须加在Workbook_BeforeClose和workbook_BeforeSave事件里?
- 如何使应用程序永远在最前端
- 请问怎么在另一个程序的窗口中新建一个Label控件?
- 用ActiveXControl编程怎样实现两个.ctl之间的调用
- 请教错误处理
- 关于TreeView控件的几个使用的问题?
- 高分求解:VB和MySQL的问题
- 两个月能做一个中小企业用的 CRM 吗?
- 怎样在datagrid中实现整行选定
- 重复值的检查问题,不知道可不可以实现!!!!
- 用VB做资源管理器,在LISTVIEW中如何取得系统图标!急!急!
ssql = "select * from 表"
If Text1.Text <> "" Then
ssql = ssql & " where Fw =" & Text1.Text & ""
iwhere = True
End If
If Text2.Text <> "" Then
If iwhere = True Then
ssql = ssql & " and Ew = " & Text2.Text & ""
Else
ssql = ssql & " where Ew=" & Text2.Text & ""
iwhere = True
End If
End If
If Text3.Text <> "" Then
If iwhere = True Then
ssql = ssql & " and Bc=" & Text3.Text & ""
Else
ssql = ssql & " where Bc=" & Text3.Text & ""
iwhere = True
End If
End If
以此类推,然后set datagrid1.datasource=ssql
好象是一个自己定义的 BOOLEN变量吧楼主在窗体中定义一下
Dim name As StringIf Check1.Value = 1 Then
riqi = Text1.Text
End If
If Check2.Value = 1 Then
name = Text3.Text
End Ifsql 语句为:"select * from 表 where 日期 =' & riqi & "'" and 名称= name and and "把查询结果.addnew到form4连接的数据库中
form4.show
你查询后得到的结果----》全局变量,
再form4.show
form4.datagrid1.datasource=全局变量