Hi Crystal!
Here is the result that code produced. I really appreciated also learning
to import those tables...just another great tip you've given!!
jtblClaimIntParty
==========================
0 ClaimID, 4 (Long), 4
1 InterestedPartyID, 4 (Long), 4
jtblInspRepairer
==========================
0 InspLocID, 4 (Long), 4
1 RepairerID, 4 (Long), 4
tblAdjuster
==========================
0 AdjusterID, 4 (Long), 4
1 CompanyID, 4 (Long), 4
2 AdjusterFirstName, 10 (Text), 50
3 AdjusterLastName, 10 (Text), 50
4 AdjusterPhone, 10 (Text), 50
5 AdjusterExtn, 10 (Text), 50
6 AdjusterFax, 10 (Text), 50
7 AdjusterEmail, 10 (Text), 50
tblAppraiser
==========================
0 Appraiser ID, 4 (Long), 4
1 AppaiserFirstName, 10 (Text), 50
2 AppraiserLastName, 10 (Text), 50
3 AppraiserAddress, 10 (Text), 50
4 AppraiserCity, 10 (Text), 50
5 State, 10 (Text), 50
6 AppraiserZip, 10 (Text), 50
7 AppraiserPhone, 10 (Text), 50
8 AppraiserCell, 10 (Text), 50
9 AppraiserFax, 10 (Text), 50
tblAssignment
==========================
0 AssignmentID, 4 (Long), 4
1 ClaimCoID, 4 (Long), 4
2 ClaimID, 4 (Long), 4
3 VehicleID, 4 (Long), 4
4 Time&ExpenseID, 4 (Long), 4
5 AssignmentNumber, 10 (Text), 50
6 DateAssignmentReceived, 10 (Text), 50
7 DateAssignmentCompleted, 10 (Text), 50
8 AppraisalType, 10 (Text), 50
9 CAPNumber, 10 (Text), 50
10 TimeAssignmentReceived, 10 (Text), 50
tblCity
==========================
0 CityName, 10 (Text), 50
tblClaim
==========================
0 ClaimID, 4 (Long), 4
1 AdjusterID, 4 (Long), 4
3 InsuranceCoID, 4 (Long), 4
5 PoliceReportID, 4 (Long), 4
6 ClaimNumber, 10 (Text), 50
7 DateofLoss, 10 (Text), 50
8 LossType, 10 (Text), 50
9 PolicyNumber, 10 (Text), 50
10 OktoPay, 10 (Text), 50
11 LossCity, 10 (Text), 50
12 LossState, 10 (Text), 50
13 LossZip, 10 (Text), 50
14 PointofImpact, 10 (Text), 50
15 SecondaryPointofImpact, 10 (Text), 50
16 FactsofLoss, 12 (Memo), 0
tblClientCo
==========================
0 ClientCoID, 4 (Long), 4
1 ClientCoName, 10 (Text), 50
2 ClientCoAddress, 10 (Text), 50
3 ClientCoCity, 10 (Text), 50
4 ClientCoState, 10 (Text), 50
5 ClientCoZip, 10 (Text), 50
6 ClientCoPhone, 10 (Text), 50
7 ClientCoFax, 10 (Text), 50
8 ClientCoEmail, 10 (Text), 50
9 CompanyType, 10 (Text), 50
tblInspection
==========================
0 InspectionID, 4 (Long), 4
1 AppraiserID, 4 (Long), 4
2 AssignmentID, 4 (Long), 4
3 VehicleID, 4 (Long), 4
4 PropertyID, 4 (Long), 4
5 RepairerID, 4 (Long), 4
6 DateInspected, 10 (Text), 50
7 OwnerPresent, 10 (Text), 50
8 Lot#, 10 (Text), 50
9 RowLocation, 10 (Text), 50
10 InspectionType, 10 (Text), 50
11 InterestedPartyID, 4 (Long), 4
tblInspectionLocation
==========================
0 InspLocID, 4 (Long), 4
1 InspectionID, 4 (Long), 4
2 RepairerID, 4 (Long), 4
3 InspectionLocation, 10 (Text), 50
4 InspectionLocationName, 10 (Text), 50
5 InspectionAddress, 10 (Text), 50
6 InspectionCity, 10 (Text), 50
7 InspectionState, 10 (Text), 50
8 InspectionZip, 10 (Text), 50
9 InspectionPhone, 10 (Text), 50
10 InspectionContact, 10 (Text), 50
tblInterestedParty
==========================
0 InterestedPartyID, 4 (Long), 4
1 InterestedPartyFirstName, 10 (Text), 50
2 InterestedPartyLastName, 10 (Text), 50
3 InterestedPartySuffix, 10 (Text), 50
4 InterestedPartyAddress, 10 (Text), 50
5 InterestedPartyCity, 10 (Text), 50
6 InterestedPartyState, 10 (Text), 50
7 InterestedPartyZip, 10 (Text), 50
8 InterestedPartyPhone 1, 10 (Text), 50
9 InterestedPartyPhone 2, 10 (Text), 50
10 InterestedPartyPhone 3, 10 (Text), 50
11 InterestedPartyAddlContact Name, 10 (Text), 50
12 Claim Party, 10 (Text), 50
tblRepairer
==========================
0 RepairerID, 4 (Long), 4
1 RepairerType, 10 (Text), 50
2 RepairerName, 10 (Text), 50
3 RepairerAddress, 10 (Text), 50
4 RepairerStreet, 10 (Text), 50
5 RepairerCity, 10 (Text), 50
6 RepairerState, 10 (Text), 50
7 RepairerZip, 10 (Text), 50
8 RepairerPhone, 10 (Text), 50
9 RepairerFax, 10 (Text), 50
10 RepairerTIN, 10 (Text), 50
tblVehicle
==========================
0 VehicleID, 4 (Long), 4
1 VehicleOptionID, 4 (Long), 4
2 InspectionID, 4 (Long), 4
3 AssignmentID, 4 (Long), 4
4 VehicleYear, 3 (Integer), 2
5 VehicleMake, 10 (Text), 50
6 VehicleModel, 10 (Text), 50
7 VehicleSubmodel, 10 (Text), 50
8 VehicleVIN, 10 (Text), 50
9 VehicleMileage, 10 (Text), 50
10 VehicleLicense, 10 (Text), 50
11 VehicleColor, 10 (Text), 50
12 VehicleBodystyle, 10 (Text), 50
13 Vehicle#ofPassengers, 10 (Text), 50
14 VehicleEngineSize, 10 (Text), 50
15 VehicleCylinders, 10 (Text), 50
16 VehicleTransOptions, 10 (Text), 50
17 VehicleTransmission, 10 (Text), 50
18 #ofGears, 10 (Text), 50
19 LicenseState, 10 (Text), 50
20 LicenseExp, 10 (Text), 50
21 Lienholder, 10 (Text), 50
22 Leased, 10 (Text), 50
strive4peace said:
Hi Pamela,
thank you ... but let me tell you how to link to tables -- would also
like to see data type and size...
1. make a blank database
2. Link to the tables you want to document
~~~
with Access 2003 or lower:
3. File, Get External Data, Link Tables...
4. navigate to your database
5. select the tables you want
6. Link
~~~
with Access 2007:
3. External data tab on Ribbon
4. click Access icon in the Import group
5. choose --> link to data source by creating a linked table
6. click the Browse button to choose the database file
7. click OK to see a list of tables
~~~
then, create the general module again, compile the code, then run it,
and paste what is in the Immediate window into your message <smile>
the reason they did not show up in the Debug (Immediate) window is that
the number of lines are limited... so they actually got analyzed, but
then it was overwritten since you have so many tables!
Warm Regards,
Crystal
remote programming and training
Video Tutorials on YouTube!
http://www.youtube.com/user/LearnAccessByCrystal
Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace
*
have an awesome day
*
Hi Crystal!
Thinking in terms of nouns is very helpful. I think (I hope) I've done a
pretty good job on these. I'll list some of them out here for you. I don't
understand much of what your code did but since all of my tables are in the
same db, why didn't these other tables get included? I would do as you
suggested with creating a new db and linking the tables but I don't know how
to "link" the tables...sorry.
tblClaim-ClaimID(pk),AdjusterID,InsuranceCoID,ClaimNumber,DateofLoss,LossType, PolicyNumber, LossCity, LossState, LossZip, LossFacts
tblClientCo-ClientCoID(pk),ClientCoName,ClientCoAddress,ClientCoCity,
ClientCoState, ClientCoZip, ClientCoPhone, ClientCoFax,ClientCoEmail,
ClientCoType
tblAdjuster-AdjusterID(pk),AdjusterFirstName,AdjusterLastName,AdjusterPhone,
AdjusterExtn,AdjusterEmail
tblAssignment-AssignmentID(pk),ClaimID(fk), AssignmentNumber,DateReceived,
DateCompleted,AssignmentType,TimeReceived
jtblClaimIntParty-ClaimID(pk),InterestedPartyID(pk)-this is a junction table
between the Claim and Interested Parties (or the people) which have a
many-to-many relationship and each claim can have many parties and each party
could have many claims.
tblInterestedParty-InterestedPartyIDpk),FirstName,LastName,Address,City,State, Zip, Phone, Phone2, Phone3, ClaimParty(to designate insured or claimant)
tblVehicle-VehicleID(pk), AssignmentID(fk), Year, Make, Model, Submodel,
VIN, Mileage, License, Bodystyle, Enginesize, Cylinders, Transmission
tblInspection-InspectionID(pk), VehicleID(fk), AppraiserID(fk),
DateInspected, OwnerPresent, InspectionType
tblInspectionLocation-InspLocID(pk),InspectionID(fk), InspectionLocation,
InspectionLocationName, InspectionAddress,InspectionCity,
InspectionState,InspectionZip, InspectionPhone, InspectionContact
tblRepairer-RepairerID(pk),Name, Address, City, State, Zip, Phone, Fax, TIN,
Contact, RepairerType
jtblInspRepairer - InspLocID, RepairerID - again, this is a junction table
as this is a many-to-many relationship.
These are the tables I'm working with now. I'll try to break it down for
you as far as our business...maybe this will help you to see what's happening
in reference to my InterestedParty problem. Or, again, if you have a better
idea of how to run that. I had thought to have separate tables for insureds
and claimants but that seemed to go against the normalization rules I was
reading.
Thank you again, you really have been such a jewel and have an immense
amount of patience!
:
Hi Pamela,
applying the same principles... keep separate things in separate
tables... think about your car accident information. You didn't list
those tables, so I did not comment on them -- would help if you would
list them... to just get those tables: make a blank database, link to
the tables where your information is, put the code in, and run it.
I am taking a guess here...
Think of the nouns that you have; each of these is a separate table
Vehicles
Accidents
Accidentees (don't know what to call them... people?)
Insurance Policies
Claims
....once I see your fields, I can give you better information <smile>
Warm Regards,
Crystal
remote programming and training
Video Tutorials on YouTube!
http://www.youtube.com/user/LearnAccessByCrystal
Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace
*
have an awesome day
*
Pamela wrote:
Hi Crystal!
Thanks for the table structure help...I'll be sure to make those changes
before I get into any of the forms for them. Did you find anything that
would help with the tables I working with currently? My db consists of a
total of 43 tables and more than half weren't mentioned in that report/module
I pasted. (I do apologize as someone else corrected my use of "field" when
referring to a "control" so I'll be sure to try to get that right for you).
Do you have any other ideas of how I can set this up differently to be able
to handle my car accident parties (insureds & claimants)? Thanks again, I
recognize you put a lot of time and thought into this already for me!!
Pamela
:
Hi Pamela,
Great! Yes, looking at your structure, we can guide you much better <smile>
"Me.cboClaimCoID.Undo...IS a field on my form"
I find it easiest to make the control NAME the same as the field name
for bound controls. If you do this, then you will be able to use your
fieldname, since it will also be the control name -- but Access wants
the Name of the CONTROL on the form you are behind (that is what 'Me'
means), not the name of the field... Property Sheet --> first property
listed on both the 'Other' and the 'All' tabs
Don't use spaces or special characters (underscore _ is ok) in your
names, so rename Lot# to something like 'Lot' (since you are storing it
as text and not a number, you should not use anything in the fieldname
that indicates it is a number anyway). Rename [Safety ID] to [SafetyID]
without a space
[Anti-Lock Brakes] should not have spaces or a dash
Rather than the structure you have for your Safety table, it would be
best to make a table to list the item types
SafetyItems
- SafeItemID, autonumber
- SafetyItem, text
record would be as follows:
1, "Anti-Lock Brakes"
2, "Anti-Lock Brakes Rear" --> does this mean that 1 is on the front?
If so, it should be specified that way
but, you may also wish to write your descriptions such that the most
important classification is first:
1, "Brakes, Anti-Lock"
2, "Brakes, Anti-Lock, Rear"
3, "Brakes, Disc, 4-wheel"
this way, when the list is sorted, it makes better sense
and then, your Inspections table would have a related table for the
applicable items
I see you also have a table tor Seating options. With this new
information, then I would, INSTEAD, suggest these tables:
ItemCats
- ItemCatID, autonumber -- PK
- ItemCategory, text
records:
1, "Safety"
2, "Seating"
then, you would make an Items table:
Items
- ItemID, autonumber -- PK
- ItemCatID, long integer -- FK to ItemCats
- Item, text
records like this:
1, 1, "Brakes, Anti-Lock"
2, 1, "Brakes, Anti-Lock, Rear"
3, 1, "Brakes, Disc, 4-wheel"
4, 2, "Cloth Seats"
5, 2, "Leather Seats"
you may even with to make subcategories. You can do this by expaning
the ItemCats table to this:
ItemCats
- ItemCatID, autonumber -- PK
- ItemCategory, text
- ItemCatID_, long integer -- 'parent' category (corresponds to ItemCatID)
- Lvl, integer (Level is a reserved word) -- you probably do not want to
go down more than 1 level, but if you do have a need, this structure
could accomodate it
records:
1, "Safety", NULL, 0
2, "Seating", NULL, 0
3, "Brakes", 1, 1
4, "Airbags", 1, 1
etc
PK = Primary Key
FK = Foreign Key
States: I find it best to store the 2-character state abbreviation
instead of an ID field. You can have a States table for looking up such
as this:
States
St, text, 2 -- PK
Statename, text, 30
and, if you deal with Canadian clients, add this field to the States table:
Ctry, text, 2
and then add this field to the States table. Tell you what, if you are
interested in getting the tables I have already set up, let me know and
I will put then on the net for you.
Don't use & in a fieldname ...Time&ExpenseHours
once again, you should have a table with ExpensesTypes ...
ExpenseTypes
- ExpTypID, autonumber --PK
- ExpenseType, text
records:
1, "Miles"
2, "Parking"
3, "Tolls"
etc
and then, I am assuming you also have a Jobs table with JobID to
attribute the expense to if it is billable:
Expenses
- ExpenseID, autonumber -- PK
- JobID, long integer, FK to Jobs (if billable)
- ExpTypID, long integer, FK to ExpenseTypes
- ExpAmount, currency
- ExpQty, number -- ie: number of hours, etc
- RateID, long integer -- FK to Rates
Rates
- RateID, autonumber -- PK
- Rate, currency
- RateDescr, text -- (rate description)
Always check names to make sure you are not using a reserved word:
Problem names and reserved words in Access, by Allen Browne
http://www.allenbrowne.com/AppIssueBadWord.html