User Profile

Collapse

Profile Sidebar

Collapse
pl626
pl626
Last Activity: Aug 19 '09, 10:56 PM
Joined: Aug 18 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • pl626
    replied to Subform requery not working from Main form
    AJ,

    No worries, the problem was with the syntax in the bound queries. Once I appended the SQL with the fully qualified name, [Forms]![mainform]![subform], everything works perfectly. Thx for your support on this.
    See more | Go to post

    Leave a comment:


  • pl626
    replied to Subform requery not working from Main form
    I just sent you a PM. I can't shrink down the screenshots without rendering them useless, but I can e-mail you. BTW, the code you suggested no longer results in the '2450' error, but it behaves just like the macro does, i.e., I am prompted for the parm value for the first control when I execute the second control. I also added a macro to open the subform, which kind of fixes the problem, but not quite. The parm prompt goes away, but the bound...
    See more | Go to post

    Leave a comment:


  • pl626
    replied to Subform requery not working from Main form
    Thx NeoPa, unfortunately, I need to use the subform as it populates the child table. The main form has bound objects that populate the header table. I'm certain my problem is referencing the subform from the main form, but I'm not certain from which event to code the subform requery or do I need to declare some variables?...
    See more | Go to post

    Leave a comment:


  • pl626
    replied to Subform requery not working from Main form
    I updated the code in the subform and it works fine in the subform, but now when I run the subform from the main form, I get a "Run-time error '2450' " stating it can't find my subform. Do I need to add code in the main form to reference the subform?
    See more | Go to post

    Leave a comment:


  • pl626
    replied to Subform requery not working from Main form
    AJ,

    i did mistype in my response, the syntax i used is:
    Code:
    Private Sub Form_Load()
          Forms![MainFormName]![subFormName].Form![controlname].Requery
    End Sub
    Is there are different event on the main form I should be using?
    See more | Go to post
    Last edited by NeoPa; Aug 18 '09, 09:00 PM. Reason: Please use the [CODE] tags provided.

    Leave a comment:


  • pl626
    replied to Subform requery not working from Main form
    AJ-thx for the quick response. My main form captures data for the header record of the parent table and the subform feeds a child table. The linkages are fine. There is no data that is being passed from the main form to the subform for these 3 controls. These 3 controls apply only to the subform data. The first control is a Combo-Box with values the user selects. This value is used to filter results for selection in the second combo box, which...
    See more | Go to post

    Leave a comment:


  • pl626
    replied to Subform requery not working from Main form
    Thx for the quick response.



    Yes, I have 3 Combo Boxes in the Sub-form. As I understand it, that code should be on the main form correct? For which event should this code be assigned, 'On Got Focus'? Thx....
    See more | Go to post

    Leave a comment:


  • pl626
    started a topic Subform requery not working from Main form

    Subform requery not working from Main form

    In Access 2007, my subform has 3 controls that filter data from queries based on user selections from the preceding controls using the requery macro. It works fine when I have only the subform open.

    However, when I try to run it from the main form, the parameters do not pass to the next control. Instead, I get a dialog box to input the value. How do I get the subform to work from the main form? Thx.
    See more | Go to post
No activity results to display
Show More
Working...