Form not filtering

mafhobb

Registered User.
Local time
Today, 16:25
Joined
Feb 28, 2006
Messages
1,249
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
 
Can you post a sample copy of your db?
 
if there is no record in [tblCleaningsDone ], then you will get no records.
Youd want an OUTER join.
 

Users who are viewing this thread

Back
Top Bottom