请教使用控件ADODC问题,
Z1 = Val(Text1(0)): Z2 = Val(Text1(1))If Check3 = 0 Then '自动计算切向变位系数
sb = Z2 / Z1
Adodc1.Visible = False
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\biao1.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from qx where A<=" & Z1 & " and B>=" & Z1 & " and C<=" & sb & " and D>=" & sb
Set DataGrid1.DataSource = Adodc1
Text1(8) = Adodc1.Recordset.Fields(1).Value
Adodc1.Refresh
DoEvents
Else
Xt = Val(Text1(8)) '自定义切向变位系数
End If
访问数据文件,首次输入Z2=34,Z1=21,Text1(8)=0,但改变Z1=6时,计算一次Text1(8)却还是原来的0,正确答案是0.265,而我再计算一次,才能是0.265,为什么要计算二次才能得到正确的答案,我之前都好计算一次,现在不知道什么原因,都要计算二次。请帮忙看下