Sniper-BoOyA-
Registered User.
- Local time
- Today, 02:17
- Joined
- Jun 15, 2010
- Messages
- 204
Morning,
I have 2 tables;
Compression and Compression_Import.
Table Compression is currently used to enter the load applied to the sample followed by a query that calculates the 'compression strength' using the entered load and the surface of the sample.
Table: Compression
.Labnr .,.... Load
13-142
13-142
13-142
13-142
13-142
13-142
What i would like to do is to import both the 'load' and 'compression strenght' from the machine.
So i have managed to do an export on the machine (to Excel) and then made an import function which imports the content of the Excel file and puts it in a table called Compression_Import.
Table: Compression_Import
.Labnr .,.... Load........Compression strength
13-142.....11372..................64.3
13-142.....11376..................64.9
13-142.....11379..................65.3
13-142.....11343..................61.3
13-142.....11372..................64.3
13-142.....11371..................64.3
What i'd like to do is to update Compression.load with the value of Compression_import.load.
I have tried several things like
SQL Statement:
But all it only seems to get the value of the last labnr from Compression Import and updates everything with it.
Result:
13-142.....11371
13-142.....11371
13-142.....11371
13-142.....11371
13-142.....11371
13-142.....11371
Is there a way of doing this using VBA? Or am i doing something wrong in the SQL statement?
I have been trying to get this to work for a couple of hours, but after checking the internet for the last hour or so i can not get it to work at all..
Thanks in advance.
Regards,
Michael
I have 2 tables;
Compression and Compression_Import.
Table Compression is currently used to enter the load applied to the sample followed by a query that calculates the 'compression strength' using the entered load and the surface of the sample.
Table: Compression
.Labnr .,.... Load
13-142
13-142
13-142
13-142
13-142
13-142
What i would like to do is to import both the 'load' and 'compression strenght' from the machine.
So i have managed to do an export on the machine (to Excel) and then made an import function which imports the content of the Excel file and puts it in a table called Compression_Import.
Table: Compression_Import
.Labnr .,.... Load........Compression strength
13-142.....11372..................64.3
13-142.....11376..................64.9
13-142.....11379..................65.3
13-142.....11343..................61.3
13-142.....11372..................64.3
13-142.....11371..................64.3
What i'd like to do is to update Compression.load with the value of Compression_import.load.
I have tried several things like
SQL Statement:
Code:
UPDATE Compression_import INNER JOIN Compression ON Compression_Import.Labnr = Compression.labnr SET Compression.load = Compression_Import.[load];
But all it only seems to get the value of the last labnr from Compression Import and updates everything with it.
Result:
13-142.....11371
13-142.....11371
13-142.....11371
13-142.....11371
13-142.....11371
13-142.....11371
Is there a way of doing this using VBA? Or am i doing something wrong in the SQL statement?
I have been trying to get this to work for a couple of hours, but after checking the internet for the last hour or so i can not get it to work at all..
Thanks in advance.
Regards,
Michael