Mixing Table Data to Create a Form

C

Confused87

I have two tables:

Marathons and People

I need all the data from Marathons and the address data from People.

I have created a query:

*Marathons, address 1, address 2 et cetera

I have created a form for this data - however, I need the user to be able to
edit it.
Do queries in their nature allow this? Is the Lookup function related to
this? Should I put all the address data straight into the Marathon table -
but then how will it be updated?

Please note that whilst I am beggining to understand code, I still find it
hard to get my head round, so if it is the only option, please explain in
full.

Many Thanks
Camilla
 
K

Klatuu

This is a classic database normalization problem. That is where you have two
intities that are joined to create a third. In your case, you have marathons
and people. The basic statements are:
A marathon may have 1 to many people participate.
A Person may compete in 1 or more marathons.

These statements create a many to many relationship which has to be resolved
by the use of a junction table.

The data about a marathon would include date, time, location, any rules on
who may particiapte or in which class (men, women, children, seniors, etc)
they may participate.

And the people data would include normal demographics like name, address,
contact info, class they normally participate in.

So to build information on who is participating, you need a table that
contains the data for this relationship.

tblMarathonParticipants
MP_ID - Autonumber Primary Key
MarathonID - Long Integer - Foreign Key to record in Marathon table
PeopleID - Long Integer - Foreign Key to record in Peope table
EntryClass - Long Interger - Foreign Key to record in Class table (If
participants are allowed to compete in a class other than the Default Class
indentified in the related People record.

Then you will need to use a form/subform construct to allow you to
enter/edit information about participants in a marathon. Conversely, you
could have a form that would show all the marathons a person has entered.
 

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