Subtype Supertype

  • Thread starter Thread starter zbap
  • Start date Start date
Z

zbap

Guest
I'm hoping I chose the right section. :)

Objective: Use a combo box to display data from two different subtypes.

I have a supertype known as CUSTOMER. A customer can be a person or corporation there subtypes are PERSON and COMPANY. There is a relationship between CUSTOMER and a SERVICE entity (1:M).

I would like to display the customer names and companies from the seperate tablesusing a combo box. If this is possible what approach should I take?

Thanks alot
zbap
 
zbap,

Just make a query that joins the two tables on the CustomerID (or name).
Then use that query as the RowSource of your combo.

Wayne
 
Thanks Wayne,

This 13 year-old post, helped an access newbie today :). But I would like to ask the community for some optimization advice. As opposed to zbap my supertype contains three subtypes so optimization is a bit more important

I managed to do the merge in 3 possible ways:

  1. Merging the Names of the three subtypes in a single column using the & operator and left joins
  2. Getting 3 separate Columns with 2 blank fields in each row using left joins
  3. Getting again single column using UNION

Any comments on which is better in terms of performance? In theory UNION is the way to go as this is what it does, but I read that in order to remove duplicate entries it creates temporary indexes which slows things down a bit.

Or maybe even better a way to measure how long these methods? Google search returned nothing useful:(

PS I know solution 2 gives 3 columns instead of 1, but I can still consider this as an option for perhaps a different instance where it may be applicable to use
 

Users who are viewing this thread

Back
Top Bottom