I have a form that when a button is pressed, I wish to call a query, and, if there are any results in the query, then display the results either via pop-up or just open the query results itself (which may be easier).
So, here is sort of what I need done:
if this query has results:
then alert a pop-up with the results, or alert a pop-up, and then open the query results. Whichever is easier is fine with me.
Can someone help me complete this task?
So, here is sort of what I need done:
if this query has results:
Code:
SELECT DISTINCTROW PORECGS1.[PO Number], ([Resale Unit Price]-[Unit Acq Cost])/[Resale Unit Price] AS Expr1, PORECGS1.POLineID
FROM INVENTORYMASTER1 INNER JOIN PORECGS1 ON INVENTORYMASTER1.[Part #] = PORECGS1.[Part #]
WHERE (((PORECGS1.[PO Number])=[Forms]![REQUISITION TO PO FORM]![PO NUMBER]) AND ((([Resale Unit Price]-[Unit Acq Cost])/[Resale Unit Price])<0.07));
then alert a pop-up with the results, or alert a pop-up, and then open the query results. Whichever is easier is fine with me.
Can someone help me complete this task?