查询如何显示在MSFlexGrid网格控件中的问题。救急!

kingpeacock 2004-07-28 10:58:45
我用了六个单选按钮(option)和一个checkbox,其中六个option分成两组,三个为一组,用于查询条件的控件。我想让根据不同的复合查询条件,查询出来的的结果显示在网格控件中。
条件结构是:
if option1.value=true then
if check1.value=1 and option4.value=true then
sql="查询语句1"
elseif check1.value=1 and option5.value=ture hen
sql="查询语句2"
elseif check1.value=1 and option6.value=ture hen
sql="查询语句3"
end if
elseif option2.value=true then
if check1.value=1 and option4.value=true then
sql="查询语句4"
elseif check1.value=1 and option5.value=ture hen
sql="查询语句5"
elseif check1.value=1 and option6.value=ture hen
sql="查询语句6"
end if
elseif option3.value=true then
if check1.value=1 and option4.value=true then
sql="查询语句7"
elseif check1.value=1 and option5.value=ture hen
sql="查询语句8"
elseif check1.value=1 and option6.value=ture hen
sql="查询语句9"
end if
同时:
Private Sub Form_Load()
Option4.Enabled = False
Option5.Enabled = False
Option6.Enabled = False
Combo5.Enabled = False
Combo6.Enabled = False
Combo7.Enabled = False
End Sub

Private Sub Check1_Click()
Option4.Enabled = Not Option4.Enabled
Option5.Enabled = Not Option5.Enabled
Option6.Enabled = Not Option6.Enabled
Combo5.Enabled = Not Combo5.Enabled
Combo6.Enabled = Not Combo6.Enabled
Combo7.Enabled = Not Combo7.Enabled
Combo8.Enabled = Not Combo8.Enabled
Combo8.Enabled = False
字段较多。
或改用ListView
又如何做?
...全文
74 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
clly_ 2004-08-17
  • 打赏
  • 举报
回复
提一个纪录集写于网格不得了?
网格.recordset = rs
kingpeacock 2004-08-06
  • 打赏
  • 举报
回复
up
kingpeacock 2004-08-06
  • 打赏
  • 举报
回复
up

56,677

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧