はじめまして。よろしくお願いします
select文のwhere条件にidを指定したいのですがうまくいきません。
べつに変数を使用しなくてもよいのですが良い方法がありましたらご教授下さい
Private Sub コマンド8_Click()
Dim adoCON As ADODB.Connection
Dim adoRS As ADODB.Recordset
Dim no As interger
no=me.id
Set adoCON = Application.CurrentProject.Connection
Set adoRS=adoCON.Execute("select varcodeno from varcode_tbl where id=no")strName = adoRS!varcodeno
adoRS.Close
adoCON.Close
Set adoRS = Nothing
Set adoCON = Nothing
Me.jancode.Value = strName
End Sub