Hi all
I'm currently planning to convert an excel maintenance sheet which I use to record servicing and repairs for each of our moulding tools.
One of the things I used to do monthly in excel was to import a monthly exported report from our planning system which contained all the orders that our machines had produced for that month and calculate if they needed a service or not.
On my "ToolDetails" sheet I would have a list of each unique tool which had info like the following, which was used to keep a count of the production hours each tool had run since the last import.
ToolNo 123
PartsMadePerHour 100
ServiceMaxhours 300
CurrentProductionHours 290
We could have 1000's of orders completed within the month and when exported into a spreadsheet it would have every order on a seperate line with the part quantities created for each item.
In excel I used VBA to open up the exported jobs data and paste it into a temp sheet. on my ToolDetails sheet i would use a SumIf formula in one column to take all the values off the imported sheet, another formula to add them together and check if the quantity exceeded the max limit. If it did then it would flag it as yes in that cell ready for it to be processed. Vba would then filter and copy those details to the main sheet. A third column with the combined quanties would then be pasted as text into the Current hours column (unless it was flagged as yes where it would put a zero instead) The imported sheet would then be cleaned up ready for next month.
I would like to do the same in access but my knowledge of processing data and calculating the data like this in access is basic.
The only thing I can think of is to import into an empty table, loop through each entry in the imported data, query every part code, query each tool number and add the time to the tool details table record. Then another loop to check each tool and see if the hours are greater then the maximun hours, then combine/zero depending on the values.
But with thousands of monthly sales in the monthly export every month this sounds very inefficiant to me as there are many different tools which produce many different parts and would have to go through every single record one by one and check/process every single line. Then another loop to go through every tool to see if the imported hours had exceeded the maxiumum hours. Thousands of queries where I could have done it with 3-4 formula columns and a basic copy/paste macro in excel.
Is there an easier more efficient way of doing this with the imported data and the existing tool table in access?
I'm currently planning to convert an excel maintenance sheet which I use to record servicing and repairs for each of our moulding tools.
One of the things I used to do monthly in excel was to import a monthly exported report from our planning system which contained all the orders that our machines had produced for that month and calculate if they needed a service or not.
On my "ToolDetails" sheet I would have a list of each unique tool which had info like the following, which was used to keep a count of the production hours each tool had run since the last import.
ToolNo 123
PartsMadePerHour 100
ServiceMaxhours 300
CurrentProductionHours 290
We could have 1000's of orders completed within the month and when exported into a spreadsheet it would have every order on a seperate line with the part quantities created for each item.
In excel I used VBA to open up the exported jobs data and paste it into a temp sheet. on my ToolDetails sheet i would use a SumIf formula in one column to take all the values off the imported sheet, another formula to add them together and check if the quantity exceeded the max limit. If it did then it would flag it as yes in that cell ready for it to be processed. Vba would then filter and copy those details to the main sheet. A third column with the combined quanties would then be pasted as text into the Current hours column (unless it was flagged as yes where it would put a zero instead) The imported sheet would then be cleaned up ready for next month.
I would like to do the same in access but my knowledge of processing data and calculating the data like this in access is basic.
The only thing I can think of is to import into an empty table, loop through each entry in the imported data, query every part code, query each tool number and add the time to the tool details table record. Then another loop to check each tool and see if the hours are greater then the maximun hours, then combine/zero depending on the values.
But with thousands of monthly sales in the monthly export every month this sounds very inefficiant to me as there are many different tools which produce many different parts and would have to go through every single record one by one and check/process every single line. Then another loop to go through every tool to see if the imported hours had exceeded the maxiumum hours. Thousands of queries where I could have done it with 3-4 formula columns and a basic copy/paste macro in excel.
Is there an easier more efficient way of doing this with the imported data and the existing tool table in access?