我需要替换正在运行的变量的值

时间:2017-04-11 12:33:35

标签: ms-access access-vba

需要有关此代码的帮助...希望附加四个带有运行变量的记录

For sec_ref = 1 To 4
    qrysecscr = "v_secscr_" & sec_ref
    qrysecscr_val = Eval(qrysecscr)

    inssql1 = " Insert into sur_sec_score (Survey_ID, Section_ID, Section_Score) values "
    inssql1 = inssql1 & "(""" & v_survey_id & """, " & sec_ref & ", " & qrysecscr_val & ")"

    'CurrentDb().Execute inssql1, dbFailOnError

    MsgBox inssql1
Next

0 个答案:

没有答案