原帖由 qq_shunping 于 2007-9-5 11:51 发表
select id from table where name=sdf
这种情况如何把sql查询的值,赋值给变量呢
变象引用DAO:
变量名=CurrentDb.OpenRecordset("select id from table where name=sdf")!id
或者ADO:
变量名=CurrentProject.Connection.Execute("select id from table where name=sdf")!id
变量名=CurrentProject.Connection.Execute("select id from table where name=sdf").GetString