[AccessD] Subform not saved

Gustav Brock gustav at cactus.dk
Tue Dec 2 02:26:07 CST 2003


Hi David

Try

  MsgBox Forms!frmCustInvoice!sfrCustInvoiceMeter.Form.Dirty
  MsgBox Forms!frmCustInvoice!sfrCustInvoiceMeter.Form.NewRecord

/gustav

> AXP FE / SQL2000 BE

> I have a subform on a form.  I want to check if the record on the subform 
> has been saved when the main form is closed.  I am having problems with the 
> syntax.  If I use the following in the on unload event of the main form -

>          MsgBox Forms!frmCustInvoice!sfrCustInvoiceMeter.Dirty
> or      MsgBox Forms!frmCustInvoice!sfrCustInvoiceMeter.NewRecord

> I get "

> Object doesn't support this property or method (Error 438)"

> However

>          MsgBox Forms!frmCustInvoice!sfrCustInvoiceMeter!txtPresMeterReadDate

> returns the correct value so I know I am referring to the subform correctly.

> The reason for checking is that when the main form is being closed by the x 
> in the top right hand corner, the after update event is not firing on the 
> subform (yet the record is being saved!).  Another symptom is that I need 
> to click on the record selector twice for the pencil to turn into a triangle.

> I am sure it is something to do with refreshing the record from the SQL BE 
> but not sure how to fix it.



More information about the AccessD mailing list