Subform refresh

G

Guest

Hi everyone<

I am having a problem trying to keep my subform master/child relationship
after I update its foreign key

My invoice form, has a temporary Primary key and invoice details has a
temporary Foreign key. I am synchronizing data with Quickbooks. When it
posts to Quickbooks, I then get the true primary key and update it in the
Invoice and Invoice details tables. Here lies the problem.

I have created a procedure that updates the subforms underlying table using
a separate Data source connection from the project( I was receiving errors
that more than 1 user is trying to change the data when I used the subforms
DAO to update )

Now after the new Foreign key is updated, the form / subform lose their link
and my records disappear in the subform. ( I know the foreign key is
updating correctly)

I have tried to add these in the after the subform table is updated:
1. me.subform.requery

2.
Me.InvoiceOrderLineDetailSubForm.LinkChildFields = "IDKEY"
Me.InvoiceOrderLineDetailSubForm.LinkMasterFields = "TXNID"

3.
me.requery

I dont know why this should be so difficult.

Can anybody take a stab?

Cheers,
David
 

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