How to get variable into SQL statement

J

J_Piazza

I have a table which has an auto-assigned ID number (ex. 1 thru 10). I then
split that file into 2 separate files at the midpoint point based on the
number of records in the file. I want to be able to join the file for 2-up
printing, but the ID number of the 2nd table starts with 6. I added an
integer column to the 2nd table. I want to select the value of the midpoint,
which is stored in a separate table, and then use that value in an Update
statement.
"Update right_data set rrn = ID - " & Rec_no & "+ 1"

In a VBA module how can I use SQL to select a value from a table and store
it in a variable in the procedure so I can use it in an update query.
 
Top