Filter Is Corrupt

  • Thread starter Thread starter Larry Casey
  • Start date Start date
L

Larry Casey

Hello ,

I have a form called Form1 that uses a subform based on a query to retrive
records.

The query looks up a field on form1 to filter the records.
Example: [Forms]![Form1]![Text1]

But here is the problem:

This wa working just fine...than when I opened my form I entered
"Motherboards" in the text1 field of form1. Now, every single time I open
form1 The query always filters my data based on "Motherboards" even though I
have NO such text in the field.

I have tried deleting the query-Did not work
I deleted the Text1 Field on form1 and re-created it...Did not work

The only solution I see is deleting the whole form1 but what is making this
query stick to that filter criteria? I have searched for hours looking for
where it could possibly be pulling the data but cant find it...

Can anyone help me?

Thanks

Larry
 
Larry,

You may have saved the form while the filter was set to Motherboards.

Look at the properties of the form and see if there is anything in the
Filter property. If so, delete it and resave the form.

If this doesn't work you could use a second technique of filtering using VBA
code. Rather than set a filter change the recordsource. Add the clause "
WHERE CriteriaField = " & [Forms]![Form1]![Text1] to the recordsource. If
you already have a where clause use AND instead of WHERE. If your
recordsource is a table or query use SELECT * FROM TableName and then use
the where clause.

Good luck,

Rod Scoullar
 
Back
Top