Solved

Access 2007 Forms

Posted on 2009-07-11
4
254 Views
Last Modified: 2012-05-07
I have designed a database that contains the following tables:
CUSTOMERS (Primary Key: customernumber)
SITES (Primary Key: sitenumber)
RADIOS (Primary Key: radiornumber)
NETWORK EQUIPMENT(Primary Key: equipmentnumber)
INCIDENTS (Primary Key: incidentnumber)
In the relationships SITES is connected to CUSTOMERS via the customernumber field. All other tables are connected to the SITES table via the sitenumber field.
My issue is with the form. I can create a form that contains the CUSTOMER info and the respective SITES however when I drop a tab onto the form and create a separate tab for RADIOS, NETWORKEQUIPMENT, and INCIDENTS, I am only offered a master > child relationship that seems dependant on the CUSTOMERS table and customernumber. I need to link the tab forms back to SITES via the sitenumber field. See the attached screenshots for clarification.

What do I need to change to accompllish this. Ideallly I want to be able to locate a customer, see a list of their sites, click on the respective site and see all associated radio, networkequipment and incident information for that specific site.

ralationships.jpg
formwithpropertysheet.jpg
0
Comment
Question by:telpage
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Expert Comment

by:ErezMor
ID: 24833645
if you want to use the automated linking done by access ffrom sites to it's "children", then you'll need to have those child forms as subforms for sites and not for customers
so open sites form in design view and add the child forms directly to it and save
now open customers form and add sites as cusotmer's child form
so you have the forms reflect the relationship of your tables (sites are customers child, and radios, equipment and incidents are customers "grand-children")
that's as far deep as access will let you go in subforms,
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 24834022
You can keep your current form design/structure if you don't mind doing some coding. Since a Site is related to a Customer, you've got that correct - the Site subform is embedded in the Customer form, and I assume that you've properly related them.

If you want to view the Radio, Network Equipment and Incidents for a specific site, you can do this in the Current event of the Sites form:

Me.Parent.RadioSubformControlNAME.Form.Recorset = "SELECT * FROM w_Radions WHERE SiteNumber=" & Me.SiteNumber

Do the same for your other two subforms.

The trick is the Subform Control ojbect(s) on your main form. To refer to them correctly, you MUST refer to the Subform CONTROL, which may or may not be named the same as the form you're using as a SourceObject in that control. This is tricky, and trips up a lot of developers.

<that's as far deep as access will let you go in subforms,>

I'm not sure what ErezMor is referring to with this, but Access will allow you to go up to 7 levels deep with subforms, although that wouldn't be a wise decisions IMO. Earlier versions (A97, I believe) only allowed 3 levels but that's been changed.
0
 
LVL 12

Expert Comment

by:ErezMor
ID: 24834349
i must admit i didnt even know the allowed depth has changed over 3 levels, sorry for the mis-information
Erez
0
 

Author Comment

by:telpage
ID: 24956915
Thanks for your help on this.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question