1

I have a front end database for a remote user who needs to occasionally update records. When he hits the command button to update the records, access throws an error, but updates the table anyhow. How do I turn off the error?

error

The query in question goes like this.

UPDATE tbl1
INNER JOIN tbl2 
ON Projects.ID = tbl1.field1 
SET tbl1.[field2] = [Forms]![form1]![txtfield2], 
tbl1.field3 = [Forms]![form1]![txtfield3],
tbl1.field4 = [Forms]![form1]![txtfield4],
WHERE tbl1.ID = [Forms]![form1]![field1];

The button that opens the query is driven by the following macro.

macro

In file>options>settings>confirm, I've unchecked all three boxes.

As always, thank you all.

msiudut
  • 251
  • 1
  • 20
  • try wrapping the [Forms]![form1]![field1] in CInt(): `CInt([Forms]![form1]![field1])` - I am gussing that it is a number as id? Could you please show the table structure of tbl1? – luk2302 Jun 30 '15 at 14:13
  • Could be any of your SET values too, or your ON statement. Make sure that whatever datatype your tbl1 fields are, you are comparing them or attempting to write the same datatype to them. – Gene Jun 30 '15 at 14:29
  • 1
    Please check your results again. You will find Access actually updated only 2 of those 3 fields. It told you it couldn't update one of them because of a type conversion error. Identify which field that is and compare the field's datatype with the datatype of the value in the text box. That is the source of the error. – HansUp Jun 30 '15 at 14:30

0 Answers0