Form not filtering (1 Viewer)

mafhobb

Registered User.
Local time
Today, 11:26
Joined
Feb 28, 2006
Messages
1,245
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
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:26
Joined
Oct 29, 2018
Messages
21,456
Can you post a sample copy of your db?
 

Ranman256

Well-known member
Local time
Today, 12:26
Joined
Apr 9, 2015
Messages
4,339
if there is no record in [tblCleaningsDone ], then you will get no records.
Youd want an OUTER join.
 

Users who are viewing this thread

Top Bottom