![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi everyone, I have a form with a combo box on it. When you select a value (a PO#) from the combo box, the bound field is the indexID of the selected PO. On the same form, I have a text box that I'd like to feed from a query I've built. The query does some math and comes up with a number (qty allocated) for the selected PO. There are two tricky parts here. That query I've built needs to filter on the indexID that gets selected from the combo box on the form. Next, on the text box in the form, I've assigned the control source to be the query's value. Since there is only one field in the result of the query, there isn't much to choose from. When I launch the form, I get #Name? in the text box. Very annoying since I don't know where else to look. Here are the 3 components: Combo box on the form (cmboOEPOList): Bound Column is 1 (the IndexID) SELECT tOrders.IndexID, tOrders.PONum, tOrders.OurItemNum1, tOrders.POQty1, tOrders.OurItemNum2, tOrders.POQty2, tOrders.OurItemNum3, tOrders.POQty3, tOrders.OurItemNum4, tOrders.POQty4, tRefVendors.Vendor FROM tRefVendors INNER JOIN tOrders ON tRefVendors.VendorID=tOrders.VendorID WHERE ((([tOrders.PONum]) Like "*oe*")) ORDER BY tOrders.PONum; Query to get my qty allocated: SELECT Sum(tPartsSent.Item1Allocated) AS TotalAllocated FROM tOrders INNER JOIN tPartsSent ON tOrders.IndexID = tPartsSent.IndexID GROUP BY tOrders.IndexID, tOrders.IndexID, tOrders.POQty1 HAVING (((tOrders.IndexID)=[Forms]![FormPartsSent]![cmboOEPOList])); txt65 txtBox on Form where I'm trying to display the value of the qtyallocated from the query where it filters on the indexID of the combo box Control Source: =qItem1TotalAllocated!TotalAllocated Does anyone know why in the world this isn't connecting and instead, I get #Name? in the textbox txt65? I'd really apreciate any help I can get here. This newsgroup is typically awesome in terms of getting me out of these tricky binds. Thanks! |
![]() |
| Thread Tools | |
| Display Modes | |
| |