subform troubles

G

Guest

Hello. I have a main form (frmClient) and on it there is a tab control. On
one of the tab pages I have 2 subforms (sfrmCarrier, sfrmPolicy), both are
continous style. The frmClient and sfrmCarrier are linked properly. I now
have sfrmPolicy linked to sfrmCarrier using the child/master properties;

Child = CarrierID
Master = [sfrmCarrierSubform].Form![CarrierID]

I have used this same method on several other tab pages with 2 subforms.
Those all work fine. I have reviewed the tables, the forms, settings, and so
on and it all looks fine. But I am puzzled as to why the sfrmPolicy does not
always display the FK coming over from sfrmCarrier. The other tabs that have
2 subforms shows as soon as I begin a new record. When i go to enter a new
record, the textbox field for CarrierID will be blank. But the oddity is
there are times when the sfrmPolicy acts perfectly by displaying the FK from
sfrmCarrier. I have tried refreshing and requerying the subform before
entering a new record but that is not the answer either. I am at a loss and
to the point of deleting it all and starting over.

Does anyone have any thoughts about why the field does not always populate?

Thanks to those who respond.
 
G

Guest

Put an unbound text box (leave it visiable for testing, then make it
invisible) on the Frmclient, call it something like carrierLink.
In the on current event of the sfrmCarrier put the following:
Me.Parent!CarrierLink = me.CarrierID

You must type the master child relationship
Master: carrierlink
Child: CarrierID


JohnE said:
Hello. I have a main form (frmClient) and on it there is a tab control. On
one of the tab pages I have 2 subforms (sfrmCarrier, sfrmPolicy), both are
continous style. The frmClient and sfrmCarrier are linked properly. I now
have sfrmPolicy linked to sfrmCarrier using the child/master properties;

Child = CarrierID
Master = [sfrmCarrierSubform].Form![CarrierID]

I have used this same method on several other tab pages with 2 subforms.
Those all work fine. I have reviewed the tables, the forms, settings, and so
on and it all looks fine. But I am puzzled as to why the sfrmPolicy does not
always display the FK coming over from sfrmCarrier. The other tabs that have
2 subforms shows as soon as I begin a new record. When i go to enter a new
record, the textbox field for CarrierID will be blank. But the oddity is
there are times when the sfrmPolicy acts perfectly by displaying the FK from
sfrmCarrier. I have tried refreshing and requerying the subform before
entering a new record but that is not the answer either. I am at a loss and
to the point of deleting it all and starting over.

Does anyone have any thoughts about why the field does not always populate?

Thanks to those who respond.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top