Subform based on selection in Main form

  • Thread starter Thread starter Makelei
  • Start date Start date
M

Makelei

Hi,
(2003)
I have tried to find a solution, but I haven't yet. I think this is rahter
simple and easy - I feel dumm afterwards, but ....

I have several tables = Different baselines.
I have one query = BaselineQuery
I have one Main form = Main
I have one subform = BaseSForm

In main form I have a combox, where I can define which Baseline I want to
see - OK
It runs the query - OK
It updates the BaseForm - OK (I open it separately!)

BUT
In Main form I am not able to get the new Form to open in Subform. How do I
need to do that? It is correct when close the Main form and open it again -
Just the way it needs to be. What is the best way to make the selection and
update the subform?

Thanks in advance
MakeLei
 
Are you trying to open the a separate form as a subform? I'm not sure thats
possible without closing and opening the main form again.

There is a Refresh or Requery method that you can run on the subform, which
will update the existing subform with the updated values.


If all you need to to is requery the subform, from the mainform, you'll need
a line of code (after the rest of your code is done, from the combobox
selection if I understand correctly).


Me.<NameOfSubformControl>.Form.Requery

--
Jack Leach
www.tristatemachine.com

- "First, get your information. Then, you can distort it at your leisure."
- Mark Twain
 
Back
Top