The easiest way is to just play with the control source of the textbox (once you click on control source there is a button with "..." on it) click that and essentially remake the query in this query maker. Thats it.
You could also put an "On Click" event on the textboxes and the 'No' thing, that refreshes that textbox and also checks if the other criteria have been filled.
Thnx for the replies and i manage to find the solution,here it is:
strRowSource = "SELECT TInvDetail.DeptID, TInvDetail.PartID, Sum(TInvDetail.Qty) AS SumOfQty, TInvMaster.Posted FROM TInvMaster INNER JOIN TInvDetail ON TInvMaster.InvNo = TInvDetail.InvNo GROUP BY TInvDetail.DeptID, TInvDetail.PartID, TInvMaster.Posted HAVING TInvDetail.DeptID = '" & Me.cboDeptID & "' AND TInvDetail.PartID = '" & cboPartID & "' AND TInvMaster.Posted = No"
'Create the temporary recordset
Set db = CurrentDb
Set rs = db.OpenRecordset(strRowSource, dbOpenSnapshot)
If rs.EOF Then
SumOfQty.Value = 0
If Not IsNull(rs!SumOfQty.Value) Then
SumOfQty.Value = rs!SumOfQty.Value
'Close the temporary recordset as it is no longer needed