vb 里data控件与msflexgrid怎么实现查询,在保存,
这个查询与datagrid是一样的。保存吗。也就是平常的保存数据到数据库就可以的。private sub command1_click()if text7 = "" thenmsgbox (" 查询条件有误!请确认")exit subend ifif rec.state = adstateopen then rec.closeif flag = 0 thensql = "select * from gdkh where 股东账号=" & text7.text & ""rec.open sql, con, adopenstatic, adlockoptim**ticif rec.recordcount < 1 then msgbox ("无此账号!请确认!")exit subelseif ****(rec("股东账号")) thentext4 = ""elsetext4 = rec("股东账号")if ****(rec("股东姓名")) thentext2 = ""elsetext2 = rec("股东姓名")if ****(rec("股东类别")) thentext3 = ""elsetext3 = rec("股东类别")if ****(rec("证照编码")) thentext5 = ""elsetext5 = rec("证照编码")end ifend ifend ifend ifend ifend ifif rec.state = adstateopen then rec.closesql = "select * from gdkh where 股东账号=" & text7.text & ""rec.open sql, con, adopenstatic, adlockoptim**ticset datagrid1.datasource = recdatagrid1.enabled = falseend sub这是条件查询。如果查询到数据是空值则判断为空。 20210311