Subform Problem and Relationships

G

Guest

I use Access 2000.
We have numerous companies each with numerous individuals. Each year some
of these companies elect to attend an Annual Meeting. Each yearly meeting
has 4 possible events that an individual can elect to attend. I am trying to
create a Meetings form that includes a sub form. I want the sub form to
display all the related individuals to a company that was chosen in the main
part of the form. In addition, I would like to see in the sub form 4 -
event check boxes for each individual. Therefore each record will have a
unique year with a unique company with various related individuals with
related events for those individuals
This is the structure I have, but cannot get the end product I want.

I have these 4 tables:
tbCompanies - Primary Key =CC_ID
tbIndividuals - Primary Key=II_ID
II_GID=CC_ID
tbMeetings -No Primary Key
MMII_ID= II_ID
MMCC_ID= CC_ID= II_GID
tbMeetingsEvents -No Primary Key
MMEEII_ID= MMII_ID= II_ID
Relationships:
CC_ID to II_GID One to Many (1 company has many Individuals)
CC_ID to MMCC_ID One to Many (1 Company to many Meetings)
II_GID to MMCC_ID One to Many (1 Company to many Meetings)
MMII_ID= MMEEII_ID One to Many (1 Individual to many Meeting Events)

When I select a company in the upper part of the form, I do not show any
related individuals in the sub form. I’m totally at a loss on how to
proceed. HELP!
 
G

Guest

Hi,

First off, create a Primary key for the 2 tables without any, this allows
Access to correctly join the tables in the one-to-many way you want, and can
prevent the tables (and queries based on them) from being updateable in forms.

If that doesn't sort it, what are the Parent and Child joining fields
between the main form and the subform?

TonyT..
 
G

Guest

Hi Tony:

Thanks for your reply. I created the other 2 primary keys but still do not
get any results.

On the Meetings form I have a combo box field to select the Company.
Because we have some companies with the same exact name. I am forced to show
additional columns for the company (Address1 and State and Zip) that are
displayed with the field MM_Name. The bound column number=1 which is the 2nd
column which is the Company ID.

I hope I haven't confused you!
 
G

Guest

Hi again,

Looks like we may have found the reason, in the forms properties window,
bound column numbers start at 1, unlike columns referenced in vba which start
at 0, sounds like you need to set the bound column to 2 rather than 1.

hope that sorts it, if not post back,

TonyT..
 
G

Guest

Hi Tony:

Thanks again for your help.

Unfortunately, your possible solution did not work.
I am reworking the form from scratch and hope to figure it out. However,
I've been "brain dead" lately, and cannot yet clearly see where I'm going
astray!

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top