From: Dirk Goldgar on
"sam" <sam(a)discussions.microsoft.com> wrote in message
news:5F75EB53-F688-4F03-828E-5C1A69DBD28E(a)microsoft.com...
> Hi Dirk,
>
>> What is your actual setup?
>
> I have search criterias in form header where users select search criterias
> and click search, Now those search results are displayed as a query
> result(newQuery). What I want is to display those query result in the
> subform(which I am able to do) But for some reason the subform doesnt
> refresh. SO once I close this form and reopen it then I see the subform
> with
> the updated results.
>
>
>> What are the names of the ...
>>
>> 1. Main form?
> Form1
>
>> 2. Subform control (on the main form)?
> What do you mean by Subform control? If you mean name of the subform then
> its ChildForm1
>
>
>> 3. Subform source-object form?
>
> SourceObject of the subform is "Query.newQuery"
>
>> What is in the RecordSource property of the source-object form?
> What do you mean by RecordSource property of the source-object form?
> The name of the RecordSource is "newQuery"


Ah, I see. You haven't created a separate form to be displayed in
ChildForm2; you're just displaying a query. Please open the query
"newQuery" in SQL view, and copy/paste the SQL into a reply to this message.

If the query is already using your form's filtering controls as criteria,
all you should have to do is have your Search button requery the subform,
using a line like this in the button's Click event procedure:

Me.ChildForm1.Requery

But if your query isn't already using the form controls as criteria, it will
have to be modified so that it does.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)