Marcel2586
Registered User.
- Local time
- Today, 13:04
- Joined
- Mar 1, 2012
- Messages
- 41
Good day all,
I have again a problem with access tables and query's.
Now i need to give parts a run time.
This is a complex situation.
On the work stock list i have to give all the parts total runtime (TAT) from start to finish.
We start with MAT numbers like Z42 is equal to 5 days run time.
But if the MAT is Z42 and the department code is 1400 and destination department is 1015 then the runtime is 2 days TAT. and if MAT is Z42 and the department is code 2900 and destination department is 1015 then the runtime is 2 days. and if department is 2300 and part description is fuel manifold then the runtime is 10 days TAT. now we calculate this in excel and in vba we give the definitions.
But this is very, very slow with update times from 20 to 40 minutes. so i was thinking convert the work stock list to access for more update speed.
Question.
Do i have to use VBA to do the calculations or can i do this with a query. (i hope so)
Now i have build a table with MAT, Department, Destination, customer, TAT.
I tried to join them all to the table work stock list but this is not working.
If need be, i can upload a scaled down version to see what is happening and where the * i am talking about.
Greeting,
Marcel.
Here a piece of Excel VBA that i try to translate to a query.
I have again a problem with access tables and query's.
Now i need to give parts a run time.
This is a complex situation.
On the work stock list i have to give all the parts total runtime (TAT) from start to finish.
We start with MAT numbers like Z42 is equal to 5 days run time.
But if the MAT is Z42 and the department code is 1400 and destination department is 1015 then the runtime is 2 days TAT. and if MAT is Z42 and the department is code 2900 and destination department is 1015 then the runtime is 2 days. and if department is 2300 and part description is fuel manifold then the runtime is 10 days TAT. now we calculate this in excel and in vba we give the definitions.
But this is very, very slow with update times from 20 to 40 minutes. so i was thinking convert the work stock list to access for more update speed.
Question.
Do i have to use VBA to do the calculations or can i do this with a query. (i hope so)
Now i have build a table with MAT, Department, Destination, customer, TAT.
I tried to join them all to the table work stock list but this is not working.
If need be, i can upload a scaled down version to see what is happening and where the * i am talking about.
Greeting,
Marcel.
Here a piece of Excel VBA that i try to translate to a query.
Code:
Public Const target_Z01 As Integer = 2
Public Const target_Z03 As Integer = 2
Public Const target_Z11 As Integer = 5
Public Const target_Z17 As Integer = 3
Public Const target_Z18 As Integer = 2
Public Const target_Z21 As Integer = 2
Public Const target_Z31 As Integer = 5
Public Const target_Z32 As Integer = 2
Public Const target_Z41 As Integer = 2
Public Const target_Z42 As Integer = 5
Public Const target_Z42_1015_1400 As Integer = 2
Public Const target_Z42_1015_2900 As Integer = 3
Public Const target_Z42_fuel_manifold_2300 = 10
Public Const target_Z43 As Integer = 5
Public Const target_Z51 As Integer = 28
Public Const target_Z51_1015 As Integer = 21
Public Const target_Z51_1015_2900 As Integer = 15
Public Const target_Z51_2600 As Integer = 15
Public Const target_Z51_1015_28556 As Integer = 21 'CRMA