Update a Subform from Form on AfterUpdate Event 
Author Message
 Update a Subform from Form on AfterUpdate Event

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


Quote:
> 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



Thu, 22 Nov 2007 15:53:50 GMT  
 Update a Subform from Form on AfterUpdate Event
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.

--
Steve Schapel, Microsoft Access MVP

Quote:

> 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



Thu, 22 Nov 2007 16:44:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. BeforeUpdate (not AfterUpdate) events for form and subform

2. AfterUpdate events for form and subform

3. subform AfterUpdate event

4. SUBFORM.Requery in field AfterUpdate event doesn't work

5. Subform: AfterUpdate Event to Change Visible Property

6. Update Statement in AfterUpdate Event

7. Continous subform AfterUpdate keeps after updating!

8. Forms - subforms - after update event

9. AfterInsert Event - want to update a field in subform table from main form table

10. Forms/SubForms & Data/Update Event sequence


 
Powered by phpBB® Forum Software © phpBB Group