Subform requery

N

Neil

Does anyone know how to requery a subform from within another form.

I'm trying to use the DOCMD.REQUERY command but can't seem to get it
working.

The main form is named MAIN, whilst the subform is within a tabbed form
named Summary
and the actual subform is called SUB.

I've tried "Forms!Main!Summary!Sub" and variety of this line but nothing
helps.
I want to use a combo box on MAIN to select the status of what is display in
the subform?
(Status: Open, Closed, All) - I'm sorting out the all after!

Thanks,



Neil
 
N

Neil

Thanks. Ive had a look and even more confused now.

Can you help any more please..

The structure is this;

MAIN -->
(Tab Control) Summary (Datasheet)
(Tab Control) Reports
(Tab Control) Contacts

I have a combobox on MAIN that I want to requery or refresh the SUMMARY
Subform

Any help would be appreciative...
Thanks.

Neil
 
D

Douglas J. Steele

The fact that you have a tab control doesn't really matter: your controls on
the tab must all have unique names, so you can ignore the tab control when
referring to the controls on the tab.
 
N

Neil

so what is the actual code please?

i have tried everything but cant seem to get the subform updating.
can this be done every xx secs or automatically when it goes back to form.

this is what happens.
i click on ADD and a new window for the details appear.
when i close this window it saves the new record (or edited record) and goes
back to the subform view on the main form (Summary), but it doesn't show the
updated records or the new records on the list (datasheet view)

i have to exit the main form or the program and go back into it for the
records to appear.

any other workarounds for this problem would also be appreciated.


Regards,

Neil
 
Top