# Re: adodc find问题?

Posted by 小琳 on September 20, 1999 at 20:04:14:

In Reply to: adodc find问题? posted by Lai on September 20, 1999 at 12:10:07:

: 使用vb6 ado recordset find (access mdb)
: dim astr as integer
: dim bstr as string
: 1.adodc1.recordset.find = "栏位=" astr
: 2.adodc1.recordset.find = "栏位=" bstr
: 执行1.时成立
: 执行2.时出现:所定义的范围或型态有误
: 何故?要如何解决2.

:::因为字串型态的变数在左右两边要加上单引号：
adodc1.recordset.find "栏位='" & bstr & "'"

Follow Ups: