LoginSignup
0
0

More than 3 years have passed since last update.

SQLの内容を変数に代入する

Last updated at Posted at 2019-12-11

SQLで抽出したレコードのあるフィールドの値だけが欲しい場合に

mySQL = "SELECT TOP 1 * FROM tbl1"

set rs = currentdb.openrecordset(mySQL)

L1 = rs("フィールド名")

または

L1 = rs!F4 ' HDR=NOの場合

debug.print L1

set rs = nothing

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0