*Edit: Split from thread http://bytes.com/topic/access/answer...query-into-vba*
Thank you very much as well TheSmileyCoder i have followed you instructions to keep it all to best practice.
IOne more question if its ok, I have updated the value of x to be an Integer, this works ok but i have put a update sql into the vba to update the table based on the value of x. All the data in the table is a number/integer but i get a error saying. "Run-time error '3464' Data type mismatch in criteria expression" the sql statement is
If i change the value of x to 1 it works fine so why wont it work with the value from the vba/sql result?
Thanks
Thank you very much as well TheSmileyCoder i have followed you instructions to keep it all to best practice.
IOne more question if its ok, I have updated the value of x to be an Integer, this works ok but i have put a update sql into the vba to update the table based on the value of x. All the data in the table is a number/integer but i get a error saying. "Run-time error '3464' Data type mismatch in criteria expression" the sql statement is
Code:
db.Execute "UPDATE Location SET Location.ID = 0 WHERE Location.ID =' & x & '"
Thanks
Comment