Subform not propagating results (1 Viewer)

D

Darren

Guest
I have a form which is used for user specified query generation.
The users fill in some limited text boxes and from this a query is generated and (supposedly) displayed in a subform.
Ive used this routine with a list box and it works fine, I have a recordcount to ensure the query is being generated and this works fine.
Even when I actually go into the subforms form itself this has worked fine. HOWEVER, the subform display does not seem to propagate the correct results, it seems to use the results of the last time the actual subforms form was opened.
This suggests to me that the requery on the subform is not working - I believe this may be due to not having links but I cant see how I can link between a query that is only generated following user input and the subform. (Clearly I cannot have a bound record source for the form itself, since the query does not exist when the form initialises ).
Ultimately how do I get the subform to requery ?? ( without putting the subform on another pop up form - I know this works!)
Yours going round in circles..

[This message has been edited by Darren (edited 01-20-2000).]
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:37
Joined
Feb 19, 2002
Messages
42,970
The problem occurs because the subform's Open and Load (where the recordset is opened) events fire before the mainform's Open and Load events. That's why the subform seems to be displaying the results from the previous query. It actually is!

You will need to requery the subform's recordset or try linking the subform and Access may do it for you.
 

Users who are viewing this thread

Top Bottom