Results 1 to 7 of 7

Thread: [RESOLVED] Refresh a subform

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    66

    Resolved [RESOLVED] Refresh a subform

    Anyone know how would you go about refreshing a subform?

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Refresh a subform

    Subformname.Requery
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    66

    Re: Refresh a subform

    For my purposes, I carry out the following to refresh the form without it being a subform:

    me refers to the form Observation

    VB Code:
    1. Me.RecordsetClone.Requery
    2.     Me.RecordsetClone.MoveFirst
    3.     If Not Me.RecordsetClone.EOF Then
    4.         Me.RecordsetClone.FindFirst "[ID] = " & getCurrentID
    5.         Me.Bookmark = Me.RecordsetClone.Bookmark
    6.     End If

    If this form is nested or a subform of the other, I tried this but to no avail because it cannot find the observation form:

    VB Code:
    1. Forms("Observation").RecordsetClone.Requery

    Can you do it thru the subform itself, if so how?

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    66

    Re: Refresh a subform

    Thanks Static,

    but is there a way to requery the subform to a set record as shown in my example?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    66

    Re: Refresh a subform

    Hangon, I missed the form property in the control object. Looks like I can do it. The form property is a reference to the subform.

  6. #6
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Refresh a subform

    yes.. u can set all the subform properties from the mainform... like any other object on the form.

    hitting items ON the subform requires you to go to the design view of the subform to code it.
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    66

    Re: Refresh a subform

    Thanks

Posting Permissions

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



Click Here to Expand Forum to Full Width