I have attached a sample database to try and show what i mean!!
I have a form with a subform, when i click one of the records on the subform this open another extended form from a query that shows the full details of the record.
When the form opens i can change or add details to the record then when i close this form it requery the subform showing the changes. if any i have made.
Problem is, if a create a new record for the subform using the extended for it will not requery!! even when i save the record using a button.
I have to close the form that contains the subform and re-open it every time to show the new record??
Any ideas where i am going wrong
here are some of the codes i am using
THIS IS USED WHEN I CLICK ON THE RECORD OF THE SUBFORM
Private Sub DeliveryID_Click()
THIS IS USED IN THE QUERY FOR THE EXTENDED FORM
I USE THIS IF WHEN THE EXTENDED FORM IS OPENED WHICH ADDS THE INVOICE NUMBER FROM THE MAIN FORM
Private Sub Form_Open(Cancel As Integer)
If IsNull([InvoiceID]) Then
DoCmd.GoToRecord , , acNewRec
Me.InvoiceID = Forms!FrmInvoice!InvoiceID
THIS IS WHAT I USE WHEN CLOSING THE EXTENDED FORM TO REQUERY THE SUBFORM
Private Sub Form_Close()
If Not Me.Dirty Then
you may be best looking at the attached database and open the frminvoice form if you do not know what i mean