I can read the data but not update it. I expect I’m missing something very simple.
Dim ThisDB as Object
Dim FNum as Integer
Dim SQL as String
Set ThisDB = Application.CurrentDB
SQL = "Update Products Set ProductId=2345 where ProductId=0"
ThisDB.RunSQL(SQL)
This produces the error message:
Error #1523 (SQL Error, SQL statement = ‘Update Products Set ProductId=2345 where ProductId=0’) occurred in a call to function ‘Database.RunSQL’
I promise you the Products table does have a record with ProductId=0.
I’d also like to know how I can format this question without having to put in blank lines after every line. If I don’t, the lines are all glued together. Colin Hume