Need help with table relationship for drill down

pulledoutmyhair

Registered User.
Local time
Today, 16:29
Joined
Sep 29, 2009
Messages
11
Hi, I'm a bit new to designing databases. I'm on Access 07 and have 2 tables one is for units and the other is for maintenance details on the units. I want to be able to drill down from units to maintenance so I can see when a unit is due for service and other details from the maintenance table. I applied the relationship but when I click on the '+' symbol I get the following error:

This expression is typed incorrectly, or it is too complex to be evaluated.

HELP!!!! I have it on Auto for subdata sheet and have the relationship set,
I have done this with other tables and no problems!!!:confused:
 
you should have a linking field that joins the units to the maintenance table - to be precise, the primary key of the unit, should be present in the maintenance table, (as a foreign) , so that it is clear that

each mtce event relates to a single unit only but
a single unit can have multiple mtce events

(ie a 1-many relationship)

then the plus should work

--------
however, the bigger issue is why the plus is there!

the trouble, is that MS keep mixing undesired functionality into Access. The + sign is at best superfluous and at worse dangerous. Users should NEVER be interacting directly with tables - which loses all the rigour that you have designed into the database, and should never be aware of the existing of these plus signs. Interaction should be via forms - so in this case you COULD have a form for the units, another form for the events, and link them together, so that the events form appears as a linked subform for the units. ie it behaves as you expect the + sign to behave, but your application now controls what can be done to the data in a way that just isnt possible using tables directly. for one thing the form/subform you design can be limited to a subset of fields. the form itself can do things you could never do directly in a table - eg pick up a now() timestamp including data and time, or automatically record the windows login of the user.


for the same reason the general recommendation is not to use table lookup features in table designs

some of this depends on who will use the dbs. If it isomething for your own use, then it is often not a problem for you to use tables directly, as you will understand what the app does. nevertheless, a robust interface is still often desirable to manage interactions with multiple tables, which can be bypassed when you interact with tables directly

however, databases tend to be used as applications in their own right. therefore it is important to keep relatively unskilled users away from certain features - and this is done by a robust interface that limits what each user can do. and in this environment keeping users away from direct interaction with tables is always a good thing
 

Users who are viewing this thread

Back
Top Bottom