So I have a query that has criteria based on the value of a textbox: [Forms]![frmPropertyHistory]![txtPropertyName]. This query is the record source of a continuous form.
If I run the query in design view, it picks the criteria from the textbox or if the form is closed, it asks for the value itself and it delivers the correct results, however if I open up the continuous form (remember, this continuous form has the same query as record source), it just lists all the records, ignoring the criteria in the query. Why?
This is the query:
SELECT tblCleaningCost.PropertyName, tblCleaningsDone.CleaningDoneID, tblCleaningsDone.CleaningDate, tblCleaningCost.CleaningType, tblCleaningCost.CleaningCost
FROM tblCleaningCost INNER JOIN tblCleaningsDone ON tblCleaningCost.CostID = tblCleaningsDone.CostID
WHERE (((tblCleaningCost.PropertyName)=[Forms]![frmPropertyHistory]![txtPropertyName]));
mafhobb
If I run the query in design view, it picks the criteria from the textbox or if the form is closed, it asks for the value itself and it delivers the correct results, however if I open up the continuous form (remember, this continuous form has the same query as record source), it just lists all the records, ignoring the criteria in the query. Why?
This is the query:
SELECT tblCleaningCost.PropertyName, tblCleaningsDone.CleaningDoneID, tblCleaningsDone.CleaningDate, tblCleaningCost.CleaningType, tblCleaningCost.CleaningCost
FROM tblCleaningCost INNER JOIN tblCleaningsDone ON tblCleaningCost.CostID = tblCleaningsDone.CostID
WHERE (((tblCleaningCost.PropertyName)=[Forms]![frmPropertyHistory]![txtPropertyName]));
mafhobb