View Single Post
  #2  
Old April 2nd, 2010, 06:28 PM posted to microsoft.public.access.tablesdbdesign
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default Creating Relationships

Lindsay -

You need to fix your table structure before you go any further. Also, do
not use the # symbol in the field name - it will cause you problems later.
In fact, don't use any special characters other than the underscore to be
safe. You can change the fieldnames in the existing tables - you don't need
to start from scratch. You may want to keep the name field in the two
related tables until you are sure the data is correct, and then remove them.
Assuming there can be many experiences for each consultant and many forms for
each consultant, then start with something like this:

tblConsultants:
ConsultantID Autonumber, primary key
ConsultantName
PhoneNumber
Address1
Address2
City
State
PostalCode
Country
Email

tblConsultantForms:
FormID Autonumber, primary key
ConsultantID Long Integer, foreign key - relates to tblConsultants
ConsultantID
CV
Biodata
LOC

tblConsultantExperience:
ExperienceID Autonumber, primary key
ConsultantID Long Integer, foreign key - relates to tblConsultants
ConsultantID
Sector
Region
Comments
Languages

Once the tables are set, check the foreign keys. The ConsultantID numbers
in the two related tables should be the ConsultantID numbers that match the
names in the tblConsultants. Note that the ConsultantID in the two related
tables should be Long Integers, not Autonumber. This will allow you to
update those field before removing the Name field from the two related tables.

Once this is correct, then you should be able to create one form for each
table, then put the two 'related-table' forms on the main Consultant form as
subforms, related by ConsultantID.

If you have problems once you get this far, post the issues and the table
structures again.

--
Daryl S


"Lindsay" wrote:

I am a VERY novice Access user and attempting to build my company's first
database. I've created three tables to track our consultants:
Consultant Contact information: ID # name, phone number, address, email,
country of residence
Consultant Forms: ID #, name, CV, Biodata, LOC
Consultant Experience: ID#, name, sector, region, comments, languages

Ideally, I would like to be able to create a form with information from all
three tables into one form, but this hasn't worked each time I use the form
wizard to generate it. I can generate a form for each table but not the
tables collectively. I currently have the relationship as one to many with
the Consultant contact info as the parent table and the other 2 as the
children. I wanted to link them from Consultant ID # to name in the children
tables. I can't figure out why the relationship doesn't work and the form
can't be generated. One thing I did notice was that the Consultant ID #s are
inconsistent between tables despite referring to the same person. The parent
table starts with an ID # of 2 and I can't change it to one. Could this be
the trouble? I'd also like to be able to create searches by name, sector, or
language. Any help would be most appreciated.