Update a Subform from Form on AfterUpdate Event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Good Day All,

I have a frminvoices with field "invoicenumber" and frminvoicedetails
Subform with the same field name "invoicenumber", after the invoice number is
updated on my Main form, I would like the field updated in my invoicesubform.

any suggestions/tips?

thanks,

Brook
 
Brook

On the Change or After Update event of the "invoicenumber" on your main
form try this


DoCmd.Requery "sfrm"

where sfrm is the name of your sub-form

HTH
Allan Murphy
Email: (e-mail address removed)
 
Brook,

Is this invoicenumber field the basis of the relationship between your
Invoice and InvoiceDetails tables? What do you mean about the "invoice
number is updated on my Main form"? Do you mean moving to another or
new invoice record on the main form? Or do you mean the invoicenumber
of an existing invoice is changed? The first scenario should be handled
automatically for you via the correct setting of the Link Master Fields
and Link Child Fields properties of the subform. The second scenario
can be managed by defining a relationship between the tables with
Cascade Update enforced. If I have missed the boat here, can you please
post back with some more details of the data, the forms, and an example?
Thanks.
 
Back
Top