1: 我在用DAO对象时,能建立dim a1 as database语句
却不能建立dim a2 as table
请问这是为什么?
2:在sql语句中,能不能在select语句中用字短名用变量表示,比如说:
data1.recordsource="select * from table1 where" _ & "table1.combo1.text=text1.text"
combo1是供选择的字段!
却不能建立dim a2 as table
请问这是为什么?
2:在sql语句中,能不能在select语句中用字短名用变量表示,比如说:
data1.recordsource="select * from table1 where" _ & "table1.combo1.text=text1.text"
combo1是供选择的字段!
其实你可以直接用表名的。
也可以创建一个querydef.
2。"select * from table1 where " & table1.combo1.text " & "= '" & text1.text & "'"
"select * from table1 where " & table1.combo1.text & "= " & text1.text
你只要用如下语句就行:
dim a2 as TableDef (就是数据表了)至于字段名可用如下语句:
data1.recordsoure="select * from table1 where 字段名=" & 字符变量
就OK了
如果字段名不能确定的话,只要加" & ....& "就行了?是把?