Structure of tables: The cases tables has so many fields I am only posting
the important ones:
If it's got any repeating fields (Whatsis1, Whatsis2, Whatsis3 or
March, April, May) then it needs redesigning.
Table: Cases
Field Name DataType Desciption
CaseID AutoNo Primary Key: Used to id each
record
Long
integer>increment>Yes(No dups)
RS_File_No Number Used to id each case
Long integer>required
yes>dups ok
Then it DOES NOT ID EACH CASE. That may be the source of your
confusion. The RS_FILE_No is identifying *A CLAIMANT* in a case - not
a case. Right?
InvoiceID Number Used to id each invoice
Long integer>required
no>indexed no
The Cases table *SHOULD NOT* contain an InvoiceID - or it should if
and only if each Case refers to either zero or one invoices, NEVER
MORE.
MP Yes/No Used id if multi Claimants
Unnecessary and should be omitted. If you have a table of claimants
you can just count them.
Party# Number Assigned to additional
Claimants[0,1,2]
Claimant Text Last Name of Claimant
Insured Text Last Name of Insured
And if one case has multiple claimants, THESE FIELDS SHOULD NOT EXIST.
They should be in a *claimants* table, related one to many to this
case table.
Invoice Table:
InvoiceID Auto# Id's each invoice> Primary Key
Long
integer>increment>Yes no dups
RS_File_No Number Id's each record
Long
integer>increment>yes no dups
No. It doesn't ID each record, again unless you have ONLY ONE INVOICE,
*ever*, for a Case. Is that the case? (apologies)
[Is this wrong?]
CaseID Number Key used to link to Cases
long interger>required
no>
indexed Yes dups ok
RELATIONSHIP:
Cases Table Invoicd Table
CaseID CaseID
One to Many Relationship
Question: In the qryCashReceipts using the Cases and Invoice tables, how
should the CaseID be joined? All cases in Invoice and only those in Cases
where joined fields are equal or how? Now I am confused [a word I used
often] about the relationship in the qry and in the Relationship (1-2 many
etc.).
You must be ready to scream.
Well... I *was* using all caps a bit too much there... said:
I am.
Shall await your reply.
OK... let's start with the basics.
Each table represents one type of Entity: a case; a client; a
claimant; an invoice; something that exists in the real world.
Each record in a Table contains information about one, and only one,
member of that class. If a record contains information about two
clients - *that table is incorrectly designed*.
It appears that in the real world situation you have:
Cases
Each Case may have one or more Clients
Each Case may have one or more Claimants
Each Client may be a client for one and only one Case
******OR*******
Each Client may be a client for one or more Cases
(I don't know your business; which is true?)
Each Claimant may be a claimant for one and only one Case
******OR*******
Each Claimant may be a claimant for one or more cases
(again... which is true?)
Each Client in a Case may receive zero, one, or more Invoices
pertaining to that Case.
Is this analysis correct?
John W. Vinson[MVP]