Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Forms _ Search Form Using Query

Posted by: brastedhouse Sep 20 2019, 10:59 PM

Hello again, I have a form that is bound to a query. It has several unbound text boxes and combo boxes in the form header to use to search. In the detail section I have the query fields using =Forms!frmName!fieldName or the Like equivalent. The whole thing works when I close the query, fill in the boxes in the header with data and open the query. I get the right data listed. But I want to have a button that causes the query data to be displayed in the form fields of the detail section. I hope I am being clear. Thanks, Scott

Posted by: June7 Sep 21 2019, 01:33 AM


Not really understanding what you are doing. That expression makes no sense to. If you want to provide db for analysis, follow instructions at bottom of my post.

Posted by: brastedhouse Sep 21 2019, 07:08 AM

Hi, I have been trying to get Allen Steele's code to work for quite a while. I have rebuilt it several times and it always errors out at the filter on line. In the meantime I am trying to use a query with references to the text boxes as criteria. I am looking for a way to use a button to get the data to display on a form and not open the query directly on the screen.

1. So I have a form that is bound to a query. The query works.
2. In the header I have a series of unbound text boxes and combo boxes. (very similar to Allen Steele's example)
3. In the detail section I have fields from the bound query as a continuous form. (again, very similar to Allen Steele's example)
4. The query can be opened and show the correct data from the open and filled out form.
5. I would like to use a button to populate the continuous form with the search data from the query instead of opening the query as the visible result.

Does that help?

Thanks for taking the time to look at this, Scott

Posted by: projecttoday Sep 21 2019, 07:50 AM

Allen Steele

Luckily, Allen Browne doesn't post here (I don't think). But Doug Steele does.

Posted by: GroverParkGeorge Sep 21 2019, 08:05 AM

Allen Browne has been retired from Access Development for many years, although he maintains his foundational website which we all use so frequently. The last I heard he had accepted a position as head of a school but that was several years ago now.

Anyway, it would probably be more fruitful if you can provide a sample accdb with the tables containing only sample data and the form and queries. That way we can determine what is happening "behind the scenes" and offer useful suggestions.