Dim chaqi As String
chaqi = textchaqi.Value(textchaqi为DTpicker控件)
Dim chazhi As String
chazhi = textchazhi.Value
Set db = OpenDatabase(App.Path + "/weisheng.mdb")
data1.RecordSource = ("select * from 卫生 where 单位名称 like'%" & Textdan & "%'and 发证日期 between#" + chaqi + "#and#" + chazhi + "#")
data1.RecordSource = ("select * from 卫生 where 证号='" & Textchahao & "'and 发证日期 between#" + chaqi + "#and#" + chazhi + "#")
data1.RecordSource = ("select * from 卫生 where 片属='" & Comjian & "'and 主营 like'%" & Comzhu & "%'and 发证日期 between#" + chaqi + "#and#" + chazhi + "#")
chaqi = textchaqi.Value(textchaqi为DTpicker控件)
Dim chazhi As String
chazhi = textchazhi.Value
Set db = OpenDatabase(App.Path + "/weisheng.mdb")
data1.RecordSource = ("select * from 卫生 where 单位名称 like'%" & Textdan & "%'and 发证日期 between#" + chaqi + "#and#" + chazhi + "#")
data1.RecordSource = ("select * from 卫生 where 证号='" & Textchahao & "'and 发证日期 between#" + chaqi + "#and#" + chazhi + "#")
data1.RecordSource = ("select * from 卫生 where 片属='" & Comjian & "'and 主营 like'%" & Comzhu & "%'and 发证日期 between#" + chaqi + "#and#" + chazhi + "#")