Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One Form, three Subforms

Status
Not open for further replies.

tstowe

Technical User
Apr 29, 2003
65
US
I searched the posts and did not find a solution to my problem. Any help would be greatly appreciated.

- The form allows the user to Select the Region (North America, Asia, etc) of interest.

- Subform 1 lists all countries associated with the selected Region for the user to select.

- Subform 2 lists all input cities for the selected Country with values that can be manipulated by the user.

- Subform 3 lists all input bases for the selected Country with values that can be manipulated by the user.


Subforms 1 and 2 are working perfect in that when I select a Region only the specific countries are listed in Subform 1. When I select a specific country in Subform 1 only the cities input for that country are shown.

The problem is with Subform 3, which is similar to Subform 2 in all respects of data yet needs to be separated, isn't working as needed. This Subform will show the input information for the Region selected, regardless of intended country, so it is partially working. I have checked the properties and the relationships and am still not seeing the solution!

My question: How do I correct Subform 3 so that it performs in the same manner as Subform 2, where it only shows the bases associated with the country:region - not just the region?

Thanks ahead of time.

Tony
 
Hi Tony,

How are you making your selections? Are you using Combo boxes? How are you tying your selections together. Are all the sub-forms different forms being used as sub-forms?

Dave
 
If you have your main form using form_ID and all 3 subforms also contain that same form_ID, assuming that you have also the parent/child links relationships setup correctly then they should all have the correct data that you are looking for.

-Laughter works miracles.
 
Glohamar,

To answer your questions, I have the following forms:

Region (The main form)
Country Subform
City Subform
Base Subform

No Combo boxes are used, however I do use the navigation buttons to scroll through the different regions (North America, South America, Europe, etc), once selected. . .

Subform 1: (Country Subform) Is working correctly as it lists all of the countries associated with the selected region. Once selected. . .

Subform 2: (City Subform) Is working correctly as it Allows for entry of and lists all cities that have been input for the selected Country and allows for data manipulation.

Subform 3: (Base Subform) Continues to be problematic, but it does allow for entry of and lists all bases that have been input for the selected country.

 
MaxEd,

The relationships are set as follows:

TBL_REGION
TBL_COUNTRY
TBL_CITY
TBL_BASE


TBL_REGION has a one-to-many relationship with TBL_COUNTRY.

TBL_COUNTY has a one-to-many relationship with both TBL_CITY and TBL_BASE.

In TBL_COUNTRY I have the Link Child and Master Fields set to RegionID. In TBL_CITY AND TBL_BASE I have the Link Child field set to CountryID and the Master Field set to [TBL_Country Subform].Form![countryid].


I used the form wizard to set up the initial form where I selected Region, Country and City Tables for the base form. The wizard would not allow me to add the Base table data at this time to set up a third subform. In so much I went ahead and completed the form with REGION as the Main Form, COUNTRY as Subform 1 and CITY as Subform 2. I then done a copy/paste of City Subform for the Base Subform and simply changed the Source object information to look at TBL_Base (actually Base Subform).

I hope I answered your questions correctly and that you guys might see my problem. If you would like I could send the file to you directly as that would give you something to clearly see.

Thanks

Tony
 
Is that linked correctly? "[TBL_Country Subform].Form![countryid]" or should it be [TBL_Country Subform]!Form![countryid]. It's been awhile for me linking the parent child in subforms.
 
[TBL_Country Subform].Form![countryid]is correct based on what access is doing thus far.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top