V
vandy
Hi all,
I have a form which has a combo box containing tool nos. I have a button
which invokes a tool status qry.
I want to open my subform containing all the date transactions only if tool
status is available. if tool is not available it should not open the
transaction subform. Can this be done.
qry:
SELECT tbltoolmaster.ToolID, tbltoolmaster.ToolNo, tbltoolmaster.ToolDesc,
IIf([datereturned] Is Not Null,"On-hand","Tool Out") AS Status,
IIf([datereturned] Is Not Null,"",[DateTaken]) AS [Tool out on]
FROM (tbltoolmaster INNER JOIN tbltooltransaction ON tbltoolmaster.ToolID =
tbltooltransaction.TranToolID) INNER JOIN Tool_OutDate ON
(tbltooltransaction.TranToolID = Tool_OutDate.TranToolID) AND
(tbltooltransaction.DateTaken = Tool_OutDate.MaxOfDateTaken)
GROUP BY tbltoolmaster.ToolID, tbltoolmaster.ToolNo, tbltoolmaster.ToolDesc,
IIf([datereturned] Is Not Null,"On-hand","Tool Out"), IIf([datereturned] Is
Not Null,"",[DateTaken])
HAVING (((tbltoolmaster.ToolID)=[forms]![transactionfrm1].[cmbtoolno]));
I have a form which has a combo box containing tool nos. I have a button
which invokes a tool status qry.
I want to open my subform containing all the date transactions only if tool
status is available. if tool is not available it should not open the
transaction subform. Can this be done.
qry:
SELECT tbltoolmaster.ToolID, tbltoolmaster.ToolNo, tbltoolmaster.ToolDesc,
IIf([datereturned] Is Not Null,"On-hand","Tool Out") AS Status,
IIf([datereturned] Is Not Null,"",[DateTaken]) AS [Tool out on]
FROM (tbltoolmaster INNER JOIN tbltooltransaction ON tbltoolmaster.ToolID =
tbltooltransaction.TranToolID) INNER JOIN Tool_OutDate ON
(tbltooltransaction.TranToolID = Tool_OutDate.TranToolID) AND
(tbltooltransaction.DateTaken = Tool_OutDate.MaxOfDateTaken)
GROUP BY tbltoolmaster.ToolID, tbltoolmaster.ToolNo, tbltoolmaster.ToolDesc,
IIf([datereturned] Is Not Null,"On-hand","Tool Out"), IIf([datereturned] Is
Not Null,"",[DateTaken])
HAVING (((tbltoolmaster.ToolID)=[forms]![transactionfrm1].[cmbtoolno]));