Only diff i see is "." and "!" what does it mean?
See
http://stackoverflow.com/questions/2...access#2926286
http://bytecomb.com/the-bang-exclama...erator-in-vba/
the part i did not understand is
I don't understand this query either.
Here is what i see:
this is an update query
Code:
UPDATE [table 1] INNER JOIN table2 ON [table 1].[filed1#] = table2.[filed1] '<< this line describes linking the tables
SET [table1].[filed2] = [table2]![filed2], '<< this set which fields get updated by which values
[table1].[filed3] = [table2]![filed3],
[table1].[filed4] = [table2]![field4]
WHERE ((([table1].[field2]) Is Null Or ([table1].[field2])<[table1]![field2]) ' this is the criteria that has to be met.
AND (([table1].[field3]) Is Null Or ([table1].[filed3])>[table1]![field3])
AND (([table1].[field4]) Is Null Or ([table1].[filed4])>[table1]![field4]));
However,
there are a lot of misspelled field names
there is a hash mark that shouldn't be there
the criteria in the WHERE clause is questionable.
This is how I would change the SQL:
Code:
UPDATE [table 1] INNER JOIN table2 ON [table 1].[field1] = table2.[field1]
SET [table1].[field2] = [table2]![field2],
[table1].[field3] = [table2]![field3],
[table1].[field4] = [table2]![field4]
WHERE ((([table1].[field2]) Is Null Or ([table1].[field2])<[table2]![field2])
AND (([table1].[field3]) Is Null Or ([table1].[field3])>[table2]![field3])
AND (([table1].[field4]) Is Null Or ([table1].[field4])>[table2]![field4]));
Removed the "#" in the UPDATE line. (a field name should NOT have a hash as part of the name)
Corrected all of the misspelled field names.
Changed "Table1" to "Table2" in the criteria.
Don't know if the query will execute or provide valid results, but it can't be any worse.