oxicottin
08-07-2014, 07:40 AM
Hello, I have a combobox (cboProductLength) that has a Row Source that is a query. I would like to get rid of the query and use a sql statement in VBA as it row source if I can. How can I do this? Thanks!
Row Source Querys SQL"
SELECT tbl_ProductData.Item, tbluProducts.ProductID, tbl_ProductData.strProductLength, ImpToDec([strProductLength]) AS [Decimal], Round(ImpToDec([strProductLength])) AS SortDecimal, tbl_ProductData.IsInactiveFROM tbluProducts INNER JOIN tbl_ProductData ON tbluProducts.Product = tbl_ProductData.Product
WHERE (((tbluProducts.ProductID)=[Forms]![frm_ShiftDay]![frm_ShiftMachinesRanSubfom].[Form]![frm_MachineOutputSubform].[Form]![cboProductID]) AND ((tbl_ProductData.IsInactive)=False));
Row Source Querys SQL"
SELECT tbl_ProductData.Item, tbluProducts.ProductID, tbl_ProductData.strProductLength, ImpToDec([strProductLength]) AS [Decimal], Round(ImpToDec([strProductLength])) AS SortDecimal, tbl_ProductData.IsInactiveFROM tbluProducts INNER JOIN tbl_ProductData ON tbluProducts.Product = tbl_ProductData.Product
WHERE (((tbluProducts.ProductID)=[Forms]![frm_ShiftDay]![frm_ShiftMachinesRanSubfom].[Form]![frm_MachineOutputSubform].[Form]![cboProductID]) AND ((tbl_ProductData.IsInactive)=False));