Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post
    When I change a record on the subform I want to refresh a textbox on the main form that is based on a DCount of the specific records on the subform. How could I do that but still return record I was on in the subforma fter the refresh? How would I code the after update of the control on the subform? I tried Me.PArent.text55.requery and it would not work. Should I use refresh or recalculate, or what should the proper syntax be? Thanks

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

    Me.Parent.Recalc

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post
    It still jumps back to the first record on the subfom.Istere any way to stay or retrn to the record I was editing

    [quote name='HansV' post='763536' date='05-Mar-2009 07:12']Try

    Me.Parent.Recalc[/quote]

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Try this:

    Place a text box in the header or footer of the subform that calculates the count you want. You may be able to use Count or Sum instead of DCount.
    The text box may be hidden if you wish.
    Place a text box on the main form that refers to the text box on the subform:

    =[SubFormName]![TextBoxName]

    No code needed. The text box on the main form will be recalculated automatically.

Posting Permissions

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