Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Cheltenham, Gloucestershire, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    access form/query syncronisation (2002)

    I have a form with two sub forms.
    The top level has order no and date details.
    The first sub form lists the items ordered.
    The second sub form is for entering deliveries (which invariable come in bits!).

    The first sub form is based on a query which includes a number of calculated fields - so that I can see the balance remaining against each item. But when I add a new delivery it does not automatically update (I assume I need to run the query again). Please how can I do this without either closing the form or opening the query manually.

    (I have tried going down the sub form totals route but this only seems to work if you have the calculations on the top level form)

    Thanks

    Roberta

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: access form/query syncronisation (2002)

    You can requery the first subform after inserting a new record in the second subform. I assume that the second subform lives on the main form, not as a subform of the first subform. The code would look like this, with the name of the first subform control substituted for Subform1:

    Private Sub Form_AfterInsert()
    Me.Parent.Subform1.Form.Requery
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •