R
rfuscjr via AccessMonster.com
I have a button on a form. It calls some queries then uses vba to loop. I
am stuck on syntax. Essentially I want to loop thru a table of ids one at a
time and do a few things along the way. I get stuck on my first task which
is to take the current id in the loop and write it into a table. I thought
the syntax would be something like this but it fails:
strSqlStmnt = "INSERT INTO tblReportProviderId ( SUI_Id )VALUES ('rstCCs!
SUI_Id')"
qdf.SQL = strSqlStmnt
qdf.ODBCTimeout = 0
qdf.Execute
Note that rstCCs!Id is the value of the current id in the table I am looping
thru. I tried with an without the single quotes and it fails.
am stuck on syntax. Essentially I want to loop thru a table of ids one at a
time and do a few things along the way. I get stuck on my first task which
is to take the current id in the loop and write it into a table. I thought
the syntax would be something like this but it fails:
strSqlStmnt = "INSERT INTO tblReportProviderId ( SUI_Id )VALUES ('rstCCs!
SUI_Id')"
qdf.SQL = strSqlStmnt
qdf.ODBCTimeout = 0
qdf.Execute
Note that rstCCs!Id is the value of the current id in the table I am looping
thru. I tried with an without the single quotes and it fails.