D
darren via AccessMonster.com
1) I have a frm with a related subfrm which contains child data. On the
subfrm I have a combo box, the sql of which references a foreign key field on
the main frm. However, when I change main record the combo box still
references the last records foreign key. It is not requerying the sql on
record change.
2) I tried adding some code to the on current event of the subfrm but this
has thrown up some more strange behaviour. When I go to create a new record,
I get an error message saying that a record in the tbl behind the subfrm
cannot create a record as the FK (which relates the child to the parent )is
null, even though I haven't tried to create a child record. The code
contained seems to be irrelavant, if I take it out the error goes, but as
soon as I add any code the error reappears.
???? Getting frustrated.
P.S. Acc2003
subfrm I have a combo box, the sql of which references a foreign key field on
the main frm. However, when I change main record the combo box still
references the last records foreign key. It is not requerying the sql on
record change.
2) I tried adding some code to the on current event of the subfrm but this
has thrown up some more strange behaviour. When I go to create a new record,
I get an error message saying that a record in the tbl behind the subfrm
cannot create a record as the FK (which relates the child to the parent )is
null, even though I haven't tried to create a child record. The code
contained seems to be irrelavant, if I take it out the error goes, but as
soon as I add any code the error reappears.
???? Getting frustrated.
P.S. Acc2003