PDA

View Full Version : Solved: Set Form Filter to Null Value



CreganTur
05-16-2008, 01:19 PM
I've got a form where the record source is a query. The query has no criteria built into it. I want to set the form filter so that I will only see results where tblResults.RunDate is Null.

I've tried a lot of different things to accomplish this, but it's just not working. So far I've tried:

IsNull(tblResults.RunDate)
tblResults.RunDate Is Null
tblResults.RunDate = Null
tblResults.RunDate = Nothing
tblResults.RunDate = EmptyAny help would be greatly appreciated!

OBP
05-17-2008, 02:44 AM
Is there a second "Rundate" in the Query?
If not then
IsNull([RunDate])
might do it.
Any reason for "Filtering" the Form rather than using the Query's Criteria?

CreganTur
05-27-2008, 06:13 AM
Is there a second "Rundate" in the Query?
If not then
IsNull([RunDate])
might do it.
Any reason for "Filtering" the Form rather than using the Query's Criteria?

In the code running behind the form I've got "Me.RunDate = Date". The problem is that I keep getting a "recordset is not updateable" error. Someone here at work said it might be because the form's control source is a query. They suggested that I should remove the ((tblResults.RunDate) Is Null) from the query and filter it on the form to clear the error.

I still can't get the filter to work on the form, so I'm thinking I need to do something completely different to get this to work.

CreganTur
05-28-2008, 08:57 AM
I solved this problem by removing the Me.RunDate = Date piece of code and replacing it with a hard coded SQL Update query that will update the RunDate field directly on its table.

I gave up trying to filter on form level and moved the Is Null criteria back to the query feeding the form.