Kingsteveiv
Technical User
I have two tables in my database. I want to automatically compare two months that I select (most likely in a form)
Table 1: Forcast
Part # Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
xxx1 8 12 13 9 15 5 7 0 12 5 13 2
xxx2 5 16 13 10 0 8 15 9 0 18 16 3
xxx3 7 18 0 6 5 12 15 9 7 6 4 19
etc.
Table 2: Part Info
Part # RunQty CT
xxx1 50 14
xxx2 100 17
xxx3 75 18
Query: Month comparison (Jul/Aug)
Part # RunQty CT Month 1 Month 2 Calc Field
xxx1 50 14 7 0 xxx
xxx2 100 17 15 9 xxx
xxx3 75 18 15 9 xxx
I have linked together the Part # field from both of the tables, but i want to make a calculation based on two months that I pull from table 1. I want these two months to automatically update when selected. Example, I want to select Jul/Aug and have the numbers be automatically put in the query so I can create a calculated field. If i want to look at Sept/Oct, I want those numbers to dump into the query to be calculated. I believe I have to do this with a drop down field in a Form, because if i just select the two fields i want in the query, its a pain in rear to change everything just to recalculate if i want to compare other months. Any help would truly be appriciated.
Thank you.
Table 1: Forcast
Part # Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
xxx1 8 12 13 9 15 5 7 0 12 5 13 2
xxx2 5 16 13 10 0 8 15 9 0 18 16 3
xxx3 7 18 0 6 5 12 15 9 7 6 4 19
etc.
Table 2: Part Info
Part # RunQty CT
xxx1 50 14
xxx2 100 17
xxx3 75 18
Query: Month comparison (Jul/Aug)
Part # RunQty CT Month 1 Month 2 Calc Field
xxx1 50 14 7 0 xxx
xxx2 100 17 15 9 xxx
xxx3 75 18 15 9 xxx
I have linked together the Part # field from both of the tables, but i want to make a calculation based on two months that I pull from table 1. I want these two months to automatically update when selected. Example, I want to select Jul/Aug and have the numbers be automatically put in the query so I can create a calculated field. If i want to look at Sept/Oct, I want those numbers to dump into the query to be calculated. I believe I have to do this with a drop down field in a Form, because if i just select the two fields i want in the query, its a pain in rear to change everything just to recalculate if i want to compare other months. Any help would truly be appriciated.
Thank you.