"David Gunnarsson" <da****@hi.is > wrote in message
news:25******** *************** ***@posting.goo gle.com...
When I enter a new record and assign people to a project everything is
fine. Then when I change the id of the record (project id) and save,
the subform goes blank and people are still assigned to the old
project id.
The above sounds correct..right? You enter some people to a given project,
and save, and those people are thus (still) assigned to the project id? Is
not the above standard approach? Where else would the people be assed to?
There are also other subforms on the main form that go
blank as well, so this seems to be a general problem conerned with
linking the subforms correctly to the main form.
Hum, it sounds like the relations between the tables are not setup
correctly. Two things I would check:
1) Do the linked tables expose a timestamp field to ms-access (if the
ms-access forms are based on queries, then again, make sure a timestamp
field is exposed).
2) Are the link master, and link child fields of the same data time, and
are they setup correctly in the sub-form properties? (this setting is
critical, as it is how the relation between two tables is actually set. You
don't even have to setup a relation between the tables on the database side
(you should do this however!!!). Anyway, even after you build and setup the
relation between the tables, you still MUST set the master/child settings in
the sub-form. This is how the actual field used in the child table for the
relation is set. So, ask yourself, when you add a child record, how does it
know what parent record it belongs to? (answer: some value in the child
table is set to the key id of the parent record, and the link master/child
settings will do this for you). Of couse, this link master deal only works
for a sub-form. If you in fact launch a seperate form, then you have to use
code to setup the value for the field in the relaton.
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl************* ****@msn.com http://www.attcanada.net/~kallal.msn