I've created two forms, my main form, and a search form which is a straight copy of the main form but called search form.
The search form has a command button which runs the "Query by form" from Microsofts web page (KB210242), for the most part it works, but on the forms they have two sub forms, I can't seem to get the search form to query anything on the sub forms.
The error message I'm getting is: Runtime error 2465: Database can't find the filed "housing" referred to in your expresion.
And this is the code it "debugs" to:
I think it needs to reference the sub form somehow, I have tried using [forms]![subFormName]![housing], it comes up with the same error as above, but replaces "housing" with "forms".
Could someone please help me, as this is one of the last things I need before I can put this database into production!
Thanks
The search form has a command button which runs the "Query by form" from Microsofts web page (KB210242), for the most part it works, but on the forms they have two sub forms, I can't seem to get the search form to query anything on the sub forms.
The error message I'm getting is: Runtime error 2465: Database can't find the filed "housing" referred to in your expresion.
And this is the code it "debugs" to:
Code:
If Left(Me![housing], 1) = "*" Or Right(Me [housing], 1) = "*" Then
where = where & " AND [housing] Like '" + Me![housing] + "'"
Else
where = where & " AND [housing]='" + Me![housing] + "'"
End If
I think it needs to reference the sub form somehow, I have tried using [forms]![subFormName]![housing], it comes up with the same error as above, but replaces "housing" with "forms".
Could someone please help me, as this is one of the last things I need before I can put this database into production!
Thanks