Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Columbus, Ohio, USA
    Posts
    286
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Forms/Subforms (A2K SP 3)

    Hello all: I have a form with 2 subforms. Subform1 is on the many side of a one to many relationship (using tables as the record source); subform2 is based on a query using the same one to many relationship. When I check a check box on subform1, I would like the information to display on subform2 without having to leave the current record and return to it. I tried this:

    Private Sub APWA_Contact_AfterUpdate()

    Forms!frm_Company!frm_APWA_Info.Requery

    End Sub

    APWA_Contact is the checkbox on subform1; frm_Company is the main form, frm_APWA_Info is subform2. No success. As I stated earlier, if I leave the current record and return to it, frm_APWA_Info is updated, but not because of the AfterUpdate event. Any and all help is always greatly appreciated. TIA.

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

    Re: Forms/Subforms (A2K SP 3)

    Do you mean that you want a check box bound to the same field in the second subform to be updated too? The subforms display the values as saved in the table. If you tick a check box in subform1, this information is not saved to the table yet. To force the record to be saved, insert a line

    RunCommand acCmdSaveRecord

    above the line that requeries subform2.

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Columbus, Ohio, USA
    Posts
    286
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Forms/Subforms (A2K SP 3)

    Hans: Thanks again. Works like a charm.

Posting Permissions

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