K
KevB
Could someone please assist.
I am trying to copy several records from a table called, PAYE, and create
identical records with the only different being that the value in the field
"current" changes from True to False. I have used the following but it
generates an error message.
strSQL = "INSERT INTO paye ( current, newdate, code, limit1, rate1, limit2,
rate2, limit3, rate3, limit4, rate4, limit5, rate5, sl, ratesl) " _
& "SELECT false as current, " _
& "FROM paye " _
& "WHERE Current=True"
db.Execute strSQL, dbFailOnError
MsgBox db.RecordsAffected & "records were added"
any help would be most appreciated [I have not used the INSERT Into before
so amd not sure of the syntax?
I am trying to copy several records from a table called, PAYE, and create
identical records with the only different being that the value in the field
"current" changes from True to False. I have used the following but it
generates an error message.
strSQL = "INSERT INTO paye ( current, newdate, code, limit1, rate1, limit2,
rate2, limit3, rate3, limit4, rate4, limit5, rate5, sl, ratesl) " _
& "SELECT false as current, " _
& "FROM paye " _
& "WHERE Current=True"
db.Execute strSQL, dbFailOnError
MsgBox db.RecordsAffected & "records were added"
any help would be most appreciated [I have not used the INSERT Into before
so amd not sure of the syntax?