Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2007
    Posts
    1

    Unanswered: Updating a table field from a subform

    I'm trying to develop a form that will be used to enter purchase orders. The main form is attached to a purchase order table, which has a field called OrderTotal. I have a subform that updates a PO details table with the items ordered, prices, quantities.

    I can calculate the order total on the subform, but how do I get it to update the OrderTotal field on the other table? Basically, how do I have a form update a field with a calculated value?

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Try...

    In the AfterUpdate event of the OrderTotal field in the SubForm enter this code:

    Forms("myMainFormName").OrderTotal.Refresh

    if that doesn't work then try

    Screen.ActiveForm.Refresh

    OR

    Forms("myMainFormName").Refresh

    OR

    Screen.ActiveForm.Requery

    OR

    Forms("myMainFormName").Requery

    OR

    blah.........

    .
    Environment:
    Self Taught In ALL Environments.....And It Shows!


Posting Permissions

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