Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146

    Unanswered: subform.requery (Object invalid or no longer set)

    Access 03.

    when i try to requery my subform i get an error that says Object invalid or no longer set. access will make endless message boxes that say the same error.

    any ideas?

    Code:
    Me.frm_rpt_error_type_sub.Requery

  2. #2
    Join Date
    Jul 2004
    Posts
    125
    It's Me!frm_rpt_error_type_sub.Requery - the subform is considered a control.

  3. #3
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146
    same error even when i try Me!frm_rpt_error_type_sub.Requery.



    Private Sub cmdClear_Click()

    Me.txtFrom = ""
    Me.txtTo = ""
    Me!frm_rpt_error_type_sub.Requery

    End Sub

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    are u certain of the name of the subform control (this is NOT necessarily (in my case: never!) the name of the .sourceobject (the form) you are using to fill the subform control). you must talk to the subform control, not the form sitting in the subform control

    open your form in design view, rightclick, properties/other then click ONCE in the subform control and examine properties/other/name: talk to that name.

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146
    this is what i dont understand.

    this works:
    Private Sub cmdSearch_Click()

    Form!frm_rpt_error_type_sub.Requery

    End Sub


    this does not work:
    Private Sub cmdClear_Click()

    Me.txtFrom = ""
    Me.txtTo = ""
    Form!frm_rpt_error_type_sub.Requery

    End Sub

    (all i'm trying to do is clear the subform, i've NEVER had this issue before)
    Last edited by michelin man; 08-12-04 at 13:16.

  6. #6
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    no it doesn't work!

    you need AT LEAST
    Private Sub cmdSearch_Click()
    Forms!frm_rpt_error_type_sub.Requery
    End Sub

    ...and that will not address a subform.
    for a subform, you need:
    Forms!NameOfMotherForm.NameOfDaughterForm.requery

    izy
    currently using SS 2008R2

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ooooops!
    should read...

    for a subform, you need:
    Forms!NameOfMotherForm.NameOfSubFormControlOnMothe rAndNOTsourceForm.requery
    currently using SS 2008R2

  8. #8
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    and there's a discovery - this ever-more-stupid-and-frustrating site that seems to get worse every time they "upgrade" the software, seems to have developed a new annoyance ...inserting a space after the 50th non-space in a string!

    doesn't appear in EDIT view, shows up on read.

    a little test
    12345678901234567890123456789012345678901234567890 1234567890

    there were ZERO spaces as typed.

    hmmm
    currently using SS 2008R2

  9. #9
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146
    nothing seems to work...

    i'm going to create a new db and see if i get the same error.


    thanks for helping me with this.

  10. #10
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146
    nothing seems to work...

    i'm going to create a new db and see if i get the same error.


    thanks for helping me with this.

Posting Permissions

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