Subclassing in Access (1-1 relationships)

N

Nick in Tokyo

Hi,
I'm trying to set up one-to-one relationships. The reason for this is that I
have to make a huge table called Clients_Scoresheets to store performance in
about 35 areas. There is a score/5 and a comment for each "area" which are
logically subdivided into six sections. I originally made one huge table but
access wouldn't let me design forms/reports with the Wizard because I had too
many fields - doh. I painstakingly patched one together by hand but it's
poorly designed and would be very difficult for someone to alter.

So I'm trying to break the table into six sub-tables and link them through a
Scorecard_Main table, back to the rest of the DB. When I create a form on
this I can't create a new record because a related record is required
apparantly.

In OO programming it's called subclassing, I want to do it in Access but I
don't know how. It's the first time I've used access and I don't know any
code except for what I found around here about how to do searches. I wouldn't
know where to PUT code =)

The setup I'm going for is:

ScoreCard_Main (pointing to)
Subsection 1
Subsection 2
Subsection 3
.....

where each subsection is just a portion of the original table. Seperated to
make wizarding new forms easier for future maintenance (hopefully not me!)

This is the first time I've used access, but I have a lot of experience
programming in Java - big headache even trying to figure out how to work this
microsoft monster.

If anyone could help me out in this I would really appreciate it.
 
R

Rebecca Riordan

It's called sub-classiing in Access, too.

It sounds like you've run into problems with your data integrity. What you
want to do is use the PK of the master table (Scorecard_Main) as the FK in
the child tables. Your error messages sound like you've put the dependancy
the other way around.

Typically, you'll use sub-forms for the fields in the subsidiary tables.
That way, they can be data-bound to the appropriate tables, and Access
handles most of the synchronization code.

HTH

--
Rebecca Riordan, MVP

Seeing Data: Designing User Interfaces
Designing Relational Database Systems, 2nd Edition
www.awprofessional.com

Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step
www.microsoft.com/mspress
 
D

Doug Munich

Since you are breaking things into mulitple tables anyway, you could have
a table of individual area scores and comments, and relate that table to a
client table with a one to many relationship? I don't know if this will
help you with the report wizards, but it will be easier to maintain or
extend.

Doug
 
Top