Crowbar
06-04-2008, 10:37 AM
Trying to replace a parameter query with a standard form based on combobox type query.
Query works fine as a parameter query - its passing a parameter on to a function. Its actually Allan Browne's "on hand" function.
This works fine if I just use the plain old parameter query prompt, but my part numbers are very long, and it would be a real pain to type these in. So I am trying to use a form to supply the parameters. I get a blank query when I do this.
Also, if I remove the criteria completely the query works as expected, showing all records, however this query is driving a report, which I would like to narrow down to 1 part.
Can I not pass the parameter to the function when its collected by a form?
SQL follows:
SELECT tblProduct.PartNumber, tblProduct.ProductID, OnHand([ProductID]) AS CurrentStock
FROM tblProduct
WHERE (((tblProduct.PartNumber)=[Forms]![frmSelectPart]![cmbPartNo]));
Query works fine as a parameter query - its passing a parameter on to a function. Its actually Allan Browne's "on hand" function.
This works fine if I just use the plain old parameter query prompt, but my part numbers are very long, and it would be a real pain to type these in. So I am trying to use a form to supply the parameters. I get a blank query when I do this.
Also, if I remove the criteria completely the query works as expected, showing all records, however this query is driving a report, which I would like to narrow down to 1 part.
Can I not pass the parameter to the function when its collected by a form?
SQL follows:
SELECT tblProduct.PartNumber, tblProduct.ProductID, OnHand([ProductID]) AS CurrentStock
FROM tblProduct
WHERE (((tblProduct.PartNumber)=[Forms]![frmSelectPart]![cmbPartNo]));