Subform Query Search

Faray

Registered User.
Local time
Yesterday, 22:06
Joined
Jul 23, 2009
Messages
16
Hello,

I'm trying to use a subform to display a query. The user can enter any two search criterial and I want the subform to bring up all the records that match it. However the problem is when i do the requery for the subform it brings up every record and they have to scroll though each of them.

The criteria is [forms]![PTquery].[Searcha] or [forms]![PTquery][Searchb]. Searh a and searchb are textboxes the user can input.
Thanks
 
Hello,

I'm trying to use a subform to display a query. The user can enter any two search criterial and I want the subform to bring up all the records that match it. However the problem is when i do the requery for the subform it brings up every record and they have to scroll though each of them.

The criteria is [forms]![PTquery].[Searcha] or [forms]![PTquery][Searchb]. Searh a and searchb are textboxes the user can input.
Thanks

Well, if the criteria you have listed above is exactly how it's in the query, the syntax is wrong. It should be:

forms!ptquery!searcha or forms!ptquery!searchb

is ptquery the name of the form?
 
Well, if the criteria you have listed above is exactly how it's in the query, the syntax is wrong. It should be:

forms!ptquery!searcha or forms!ptquery!searchb

is ptquery the name of the form?

Yeah ptquery is the name of the form not the subform. If I change it, it still brings up every record, not just the ones filtered by the search.
 
Are the text boxes on the form or the subform? Also, do you have a query with the same name as the form?
 
Are the text boxes on the form or the subform? Also, do you have a query with the same name as the form?

They are in the form. The query isn't the same name as the form either.
 
Any chance of you posting the db? You can make a copy and remove any sensitive data...also, if you are using Acess 2007, save it in Access 2000-2003 format.
 
Ok I got it. forms!ptquery!searcha ended up working, for some reason it didn't save when it the first time when I did it (Even though I am pretty sure I hit ctrl-s, I guess I forgot).

Thanks your help and quick responce, hopefully I won't have anymore problems.
 

Users who are viewing this thread

Back
Top Bottom