Hi,
Is there a way to combine 2 SQL statements into 1?
Query1:
SELECT itsTbl.itsNo, itsTbl.workplanNo, itsTbl.workplanSectionNo
FROM itsTbl
WHERE (((itsTbl.workplanNo)=[Forms]![itsNewFrm]![workplanNoCombo]) AND ((itsTbl.workplanSectionNo)=[Forms]![itsNewFrm]![workplanSectionNoCombo]));
Query2:
SELECT Max(Right([itsNo],3))+1 AS itsNo_3
FROM Query1;
This SQL query will be attached to [Forms]![itsNewFrm]![workplanSectionNoCombo] AfterUpdate statement
Then, I would like to return the value of the result of Query2 to unbound field itsNo_3 in form itsNewFrm
Thanks,
John
Is there a way to combine 2 SQL statements into 1?
Query1:
SELECT itsTbl.itsNo, itsTbl.workplanNo, itsTbl.workplanSectionNo
FROM itsTbl
WHERE (((itsTbl.workplanNo)=[Forms]![itsNewFrm]![workplanNoCombo]) AND ((itsTbl.workplanSectionNo)=[Forms]![itsNewFrm]![workplanSectionNoCombo]));
Query2:
SELECT Max(Right([itsNo],3))+1 AS itsNo_3
FROM Query1;
This SQL query will be attached to [Forms]![itsNewFrm]![workplanSectionNoCombo] AfterUpdate statement
Then, I would like to return the value of the result of Query2 to unbound field itsNo_3 in form itsNewFrm
Thanks,
John