Nested Subform load order - Parameter prompts I shouldn't get

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form and subform that work fine by itself. But when I add them to
another form, I get parameter prompts I shouldn't get. I am wondering if the
furthest nested subform is loaded first, before other forms, thereby causing
it to ask for parameters it can't find in the other forms that aren't loaded
yet? Any way around this?

Ultimately, I will have the following nesting of forms: "MainForm", which
contains "PotentialFlight" subform, which contains "Feasibility" subform.

The Feasibility subform is based on a query which pulls parameter data from
the PotentialFlight subform as well as the MainForm. For example, the query
is set to show one Crew Member's flights (based on the current Member
displayed within the MainForm). The query also pulls the dates entered in
the PotentialFlight form.

The parameter prompts I'm getting are the ones for the PotentialFlight
form/subform, not the MainForm.

Is there any way around this? As I mentioned, it's working when I open the
PotentialFlight form (with the Feasibility subform included) separately from
the MainForm. The MainForm has to be open, but it works. I want to put the
PotentialFlight form within the MainForm so it's all together.

I should mention the PotentialFlight subform is not linked to anything,
there is no record source for that form, only unbound date/time fields. When
the form loads, the date/time fields default to "Date()" to prevent null
errors. Also, I've reanamed the parameters (shown below) to account for the
PotentialFlights now being a subform within MainForm - still doesn't work.
=([Forms]![MainForm].[Forms]![PotentialFlightsForm].[ETD1])-90

I've tried to keep my explanation simple, so if you need more details, let
me know. (e.g. the query is really a summary query based off of other
queries that have the parameters.)

Thanks!
 
Hi Tech Geek 1234,

Your syntax for referring to the subform isn't quite correct... try this:
=([Forms]![MainForm].[PotentialFlightsForm].[form].[ETD1])-90

Damian.

Tech Geek 1234 said:
I have a form and subform that work fine by itself. But when I add them to
another form, I get parameter prompts I shouldn't get. I am wondering if the
furthest nested subform is loaded first, before other forms, thereby causing
it to ask for parameters it can't find in the other forms that aren't loaded
yet? Any way around this?

Ultimately, I will have the following nesting of forms: "MainForm", which
contains "PotentialFlight" subform, which contains "Feasibility" subform.

The Feasibility subform is based on a query which pulls parameter data from
the PotentialFlight subform as well as the MainForm. For example, the query
is set to show one Crew Member's flights (based on the current Member
displayed within the MainForm). The query also pulls the dates entered in
the PotentialFlight form.

The parameter prompts I'm getting are the ones for the PotentialFlight
form/subform, not the MainForm.

Is there any way around this? As I mentioned, it's working when I open the
PotentialFlight form (with the Feasibility subform included) separately from
the MainForm. The MainForm has to be open, but it works. I want to put the
PotentialFlight form within the MainForm so it's all together.

I should mention the PotentialFlight subform is not linked to anything,
there is no record source for that form, only unbound date/time fields. When
the form loads, the date/time fields default to "Date()" to prevent null
errors. Also, I've reanamed the parameters (shown below) to account for the
PotentialFlights now being a subform within MainForm - still doesn't work.
=([Forms]![MainForm].[Forms]![PotentialFlightsForm].[ETD1])-90

I've tried to keep my explanation simple, so if you need more details, let
me know. (e.g. the query is really a summary query based off of other
queries that have the parameters.)

Thanks!
 
I have a form and subform that work fine by itself. But when I add them to
another form, I get parameter prompts I shouldn't get. I am wondering if the
furthest nested subform is loaded first, before other forms, thereby causing
it to ask for parameters it can't find in the other forms that aren't loaded
yet?

Yes. Forms and subforms are loaded "bottom up" - deepest nested
subform first, then up to the mainform.
Any way around this?
Probably.

Ultimately, I will have the following nesting of forms: "MainForm", which
contains "PotentialFlight" subform, which contains "Feasibility" subform.

The Feasibility subform is based on a query which pulls parameter data from
the PotentialFlight subform as well as the MainForm. For example, the query
is set to show one Crew Member's flights (based on the current Member
displayed within the MainForm). The query also pulls the dates entered in
the PotentialFlight form.

I'd suggest using the Master/Child Link Fields instead - base each
subform on a Query returning all the potential records; use either
fieldnames or control names (for unbound controls) in the Master Link
Fields, and the corresponding field names in the Child Link Fields.
For multiple fields, use semicolons to delimit.

John W. Vinson [MVP]
 
It worked! Thanks! That's awesome - I was really hoping to put everything
together on one form.

Damian S said:
Hi Tech Geek 1234,

Your syntax for referring to the subform isn't quite correct... try this:
=([Forms]![MainForm].[PotentialFlightsForm].[form].[ETD1])-90

Damian.

Tech Geek 1234 said:
I have a form and subform that work fine by itself. But when I add them to
another form, I get parameter prompts I shouldn't get. I am wondering if the
furthest nested subform is loaded first, before other forms, thereby causing
it to ask for parameters it can't find in the other forms that aren't loaded
yet? Any way around this?

Ultimately, I will have the following nesting of forms: "MainForm", which
contains "PotentialFlight" subform, which contains "Feasibility" subform.

The Feasibility subform is based on a query which pulls parameter data from
the PotentialFlight subform as well as the MainForm. For example, the query
is set to show one Crew Member's flights (based on the current Member
displayed within the MainForm). The query also pulls the dates entered in
the PotentialFlight form.

The parameter prompts I'm getting are the ones for the PotentialFlight
form/subform, not the MainForm.

Is there any way around this? As I mentioned, it's working when I open the
PotentialFlight form (with the Feasibility subform included) separately from
the MainForm. The MainForm has to be open, but it works. I want to put the
PotentialFlight form within the MainForm so it's all together.

I should mention the PotentialFlight subform is not linked to anything,
there is no record source for that form, only unbound date/time fields. When
the form loads, the date/time fields default to "Date()" to prevent null
errors. Also, I've reanamed the parameters (shown below) to account for the
PotentialFlights now being a subform within MainForm - still doesn't work.
=([Forms]![MainForm].[Forms]![PotentialFlightsForm].[ETD1])-90

I've tried to keep my explanation simple, so if you need more details, let
me know. (e.g. the query is really a summary query based off of other
queries that have the parameters.)

Thanks!
 
Back
Top