Results of a search included in a form (1 Viewer)

Emmanuelle

Registered User.
Local time
Today, 22:27
Joined
Mar 8, 2001
Messages
11
I have one form used as a search engine. On the form the user enters what he wants to search for: for example he wants the information about the CD sent in the year 1992, in the month May,.......those are the criteria for the search. Then I press a command which does the search. The button runs a query which works perfectly. I get the results I want on a datasheet and I don't see the previous form anymore. I would like to see the results from the search in my form. How do I do that?

Someone suggested I include in my form the ActiveXcontrol Microsoft Datagrid, but in the properties, I cannot link it to any queries or tables.

Any suggestions are welcome
 

Alexandre

Registered User.
Local time
Tomorrow, 04:27
Joined
Feb 22, 2001
Messages
794
Hi Emmanuelle,

I believe that you can do that by including a subform in your search form. Set the auquery that is run by your search form as the source of the subform. You can set your subform to be seen as a datasheet like your query was, if you are satisfied with that way of presenting your data. Refresh the subform each time the serach has been performed.

Hope this helps
 

Chris RR

Registered User.
Local time
Today, 16:27
Joined
Mar 2, 2000
Messages
354
Here's another approach. Set up your form to browse through all the records on first entry. Then put some text or combo boxes at the top for your criteria, and two buttons ("Filter records", "Show All"). When users hit the Filter button, build a filter in VBA and use it to restrict the set of records that are shown. When they hit "Show All", remove the filter.
 

Emmanuelle

Registered User.
Local time
Today, 22:27
Joined
Mar 8, 2001
Messages
11
I have added a subform to my form based on my query. I have tried to write in VBA nameofmysubform.Refresh and it does not do anything. Have missed something in the code?
 

Alexandre

Registered User.
Local time
Tomorrow, 04:27
Joined
Feb 22, 2001
Messages
794
Not easy to answer without knowing better how your search form works, in which event you put the code and how you based your subform on your query.

Would you mind to send me a copy of your DB, Emanuelle ?(or at leat of the relevant forms, query and tables)
 

Users who are viewing this thread

Top Bottom