F
FP1
For the sake of simplicity, I have two tables, tbl1 and tbl2
tbl1
tbl1_pk primary key
field1
field2
tbl2
tbl2_pk
tbl1_fk
field3
field4
Without a relationship defined, running a join query on tbl2.tbl1_fk=tbl1
_pk (it's a left out join, tbl1 is left) as record source to a form.
On the form, on an insert, filling a value for field1 or field2 creates a
primary key for tbl1 (expected). If I enter a value for field3, the
foreign key gets set to the primary automatically. If I do NOT enter any
data into field3 or 4 (tbl2), the foreign key is not updated, which id bad.
(If I define a constraint, I get a foreign key error in this situation.) I
can force this to happen by using me("tbl1_fk")=me("tbl1_pk")
The question is: Is this way it's supposed to work in Jet? Is there a
simple way to force the update to happen even if the data in tbl2 isn't
dirty?
tbl1
tbl1_pk primary key
field1
field2
tbl2
tbl2_pk
tbl1_fk
field3
field4
Without a relationship defined, running a join query on tbl2.tbl1_fk=tbl1
_pk (it's a left out join, tbl1 is left) as record source to a form.
On the form, on an insert, filling a value for field1 or field2 creates a
primary key for tbl1 (expected). If I enter a value for field3, the
foreign key gets set to the primary automatically. If I do NOT enter any
data into field3 or 4 (tbl2), the foreign key is not updated, which id bad.
(If I define a constraint, I get a foreign key error in this situation.) I
can force this to happen by using me("tbl1_fk")=me("tbl1_pk")
The question is: Is this way it's supposed to work in Jet? Is there a
simple way to force the update to happen even if the data in tbl2 isn't
dirty?