I did try editing the post, but it shows the image as an attached image, and I couldn't see a delete/remove option. I dunno. EDIT: "Go Advanced," Fixed.
SQL for the query:
Code:
SELECT T_MattContest_MattsBoxes.SO_STORE_CD, T_MattContest_MattsBoxes.SO_WR_DT, T_MattContest_Inspection.DEL_DOC_NUM, T_MattContest_MattsBoxes.[DEL_DOC_LN#], T_MattContest_MattsBoxes.ITM_CD, T_MattContest_MattsBoxes.QTY, T_MattContest_MattsBoxes.UNIT_PRC, T_MattContest_Inspection.BoxPctOfSpiff, T_MattContest_MattsBoxes.SplitPctOfSpiff, T_MattContest_MattsBoxes.Vendor, T_MattContest_MattsBoxes.[100Payout], T_MattContest_MattsBoxes.[75Payout], INV_ITM.DES
FROM (T_MattContest_Inspection INNER JOIN T_MattContest_MattsBoxes ON T_MattContest_Inspection.DEL_DOC_NUM = T_MattContest_MattsBoxes.DEL_DOC_NUM) INNER JOIN INV_ITM ON T_MattContest_MattsBoxes.ITM_CD = INV_ITM.ITM_CD
ORDER BY T_MattContest_MattsBoxes.SO_STORE_CD, T_MattContest_Inspection.DEL_DOC_NUM, T_MattContest_MattsBoxes.[DEL_DOC_LN#];
This form isn't technically going to be for scrolling through orders. Our company does mattress sales contests every few months. The bonus pay for selling a mattress depends on the quality of the mattress and if there was a box spring sold with the mattress. 99% of the sales have their bonuses calculated by a program I wrote. The 1% are the ones that "confuse" the program. A customer buys a king mattress and a queen box, etc. This form will pull up all of the items on that ticket so the user can determine the correct bonus pay. The form needs to be able to write back to a master table (T_MattContest_MattsBoxes) that has every ticket with a mattress on it.and edit the "payout" field. All of this data is pulled from ODBC.
The data structure you suggested exists in the ODBC already. I am having to use ~20 queries to get down to just the data that I want, and have the calculated fields that I need.