I dont know if this will help you figure out what going on. I tried an
experiment on my forms to see what would happen. I included the reg field
from my servicing and maintenance forms and they were duplicating the reg on
my main Vehicle Details form but on the Inventory form the reg field was
blank throughout the fleet. Does this help explain why is this happening?
Here are your questions and my answers to which I have not seen a response.
Maybe the web interface was losing some posts (it does that at times).
Quoting:
I have
set a registration number field in each sub table and linked each table to
the main form via the registration number. Each table has a primary key of an
auto number field. The relationship is a 1 to many on all the relationships i
have set up, with no ref integrity on any to the registration number.
Why not? A relationship without referential integrity is no relationship at
all, other than cosmetically. It makes no sense to talk about maintenance work
on a nonexistant truck... if you are billed for such work, you should contact
a good lawyer!!! Establish RI.
All the
other sub forms work fine except this inventory sub form. On the main form
when i click on the sub form of the inventory form it has a test entry say 2
x wheel straps on the first entry . But when i change to main form to view
another vehicle and click the inventory form. Each vehicle has 2x wheel
straps even though i haven't entered that data into any of them as yet. When
i go into the inventory table the data is shown only once but the
registration has not been recorded for the 1 vehicle that i tried entering
the data for.
That just about convinces me that the Master Link Field and Child Link Field
properties of this subform are either blank, or erroneous. Doublecheck that
the datatype and size of the Registration Number field matches in the truck
table and the inventory table. While you're at it, make sure RI is enforced on
this relationship. You might need to create a record for a "non-truck truck"
if you have an inventory of parts that don't belong to any particular truck; I
would expect that you might have a stock of windshield wipers and chains and
ground straps that could be put onto any truck, right???
Then, try *deleting the subform control* from your mainform. Compact and
repair the database. Then drag the Inventory form from the forms window onto
the main form (to establish it as a subform). Make sure that the registration
number is used as the master/child link field. This should keep the subform in
synch.
End Quote
Just so I understand: Do the items in the Inventory BELONG TO A TRUCK?
IF NOT... then the Reg number *should simply not exist* in the Inventory
table. A one to many relationship implies that there is a relationship. If the
inventory and the trucks are independent - if there is no connection between a
particular truck and a particular strap or wiper or air filter in the
inventory - then there *is no relationship* and a Master/Child link is
inappropriate.