If I run my Update query on its own it does the job but if I run the
same query in a Form it does nothing. Can any one tell me what I'm do
wrong; below the type of code I have tried
Example1
Dim db As Database
Dim qd As QueryDef
Set db = CurrentDb
Set qd = db.QueryDefs("Update_Mat_Class_2005")
qd.Execute
Set qd = Nothing
Set qd = Nothing
Example2
DoCmd.SetWarnings False
DoCmd.OpenQuery "Update_Mat_Class_2005"
DoCmd.SetWarnings True
below the query
UPDATE mattemp INNER JOIN mat_class_2005 ON mattemp.euro_code =
mat_class_2005.euro_code SET mat_class_2005.subsector_ =
[mattemp].[subsector_], mat_class_2005.subsector =
[mattemp].[subsector], mat_class_2005.ho_brand = [mattemp].[ho_brand],
mat_class_2005.ho_brand_c = [mattemp].[ho_brand_c],
mat_class_2005.local_brand_c = [mattemp].[local_brand_c],
mat_class_2005.local_brand = [mattemp].[local_brand],
mat_class_2005.brand_vari_c = [mattemp].[brand_vari_c],
mat_class_2005.brand_variant = [mattemp].[brand_variant],
mat_class_2005.packtype_c = [mattemp].[packtype_c],
mat_class_2005.packtype = [mattemp].[packtype],
mat_class_2005.variety_c = [mattemp].[variety_c],
mat_class_2005.variety = [mattemp].[variety], mat_class_2005.portions
= [mattemp].[portions], mat_class_2005.size = [mattemp].[size],
mat_class_2005.uom_code = [mattemp].[uom_code], mat_class_2005.uom =
[mattemp].[uom], mat_class_2005.changed = Yes;
Table Mattemp is used to maintain one specific record that was copied
from table "mat_class_2005"
Isuue is that the only the last field "mat_class_2005.changed" is
updated.