More Than 1 "One to Many" Relationships for the SAME Table (1 Viewer)

sambo

Registered User.
Local time
Today, 02:53
Joined
Aug 29, 2002
Messages
289
My company table "tblCompany" currently has a one-to-many relationship with my units table "tblUnits".
I would also like my company table "tblCompany", to have a one-to-many relationship with my "Ship To" table and my "Bill To" Table.

Is this possible?

Here is the current structure of my relationships. I realize now that if I relate my "Ship To" table to my "tblRma" then I cannot query an entire list of "Ship To" records for any given company because the list will be limited to only those records that pertain to a certain RmaID. This limits my ability to get all "Ship To" info for any given company.

Here is a look at my relationships as they stand now. I would like to move the "Ship To" Table to the left and relate it to the "tblCompany"
 

Attachments

  • relationships1.jpg
    relationships1.jpg
    63.2 KB · Views: 179

glynch

Registered User.
Local time
Today, 05:53
Joined
Dec 20, 2001
Messages
128
It doesn't necessarily restrict the ShipTo info you can get. If you don't need any tblRMA info for a particular query, just leave that table out of the query, you will get any ShipTo records you need. If you do need tblRMA data in that query you can still get any ShipTo records you need, along with any tblRMA data that you pertains, by making an outer join from the ShipTo table to tblRMA.
 

sambo

Registered User.
Local time
Today, 02:53
Joined
Aug 29, 2002
Messages
289
What if I need info only from "tblCompany" and "Ship To" Table, but none of the tables in between? How would I do this? I haven't had any luck thus far.
I would like to have a list of all "Ship To" adresses that have ever been associated with a certain company (I don't care about unit data or Rma Data in this particular case).

Suggestions...
 

glynch

Registered User.
Local time
Today, 05:53
Joined
Dec 20, 2001
Messages
128
Sorry, my last post was a little misleading, I needed to look at the data model more closely.

It looks like you are going to need to rework your data model if you want data reflecting a direct relationship between those two tables. It doesn't mean just adding a direct line between them. You may want to rethink where ShipTo belongs. I don't know the business rules of the app you are creating, but if you are looking for something your data model won't allow,maybe it doesn't fit the business rules.
 

sambo

Registered User.
Local time
Today, 02:53
Joined
Aug 29, 2002
Messages
289
I decided to make a seperate relationship model using simply "contact company" table and "contacts" table. These table values will display on my form according to the company that belongs to any particular unit.
So... Yes, you are right. I was forced to move "Ship To" out of my "Units" Relationship and create a completey different relationship for the shipping info.
Still working on it as we speak though...
 

Users who are viewing this thread

Top Bottom