AXP: Err 2467 and Recordsource change - BUG???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gianluca L. Monteleone

    AXP: Err 2467 and Recordsource change - BUG???

    Hi Folks!

    I have this strange error that happens after conversion from A97 to
    AXP (2000-Format). Looks like a bug to me - I've lost 3 days with no
    result.

    I use a form with 2 subforms on it, one to set criterias and one that
    reflects data upon selected criterias. This works perfectly. But
    sometimes I need to get started with an already "restricted " dataset.
    So what I do is to change at run-time the form.subform.re cordset
    property from qmyQuery to something like SELECT * FROM qmyQuery WHERE
    fld = ...

    This is done in the Form_Load Event of the parent form through a call
    to a generic procedure (Me as argument). As soon as it get's back the
    Me object is invalid. I tracked the problem down to the line of code
    where value Datasource of subform is changed.

    This worked perfectly in A97.

    Please help, I need to switch to AXP soon.

    Thank you very much.
    Gianluca L. Monteleone
  • Larry  Linson

    #2
    Re: Err 2467 and Recordsource change - BUG???

    Remote debugging is difficult, at best. It isn't "at best" when only a
    description of the general environment and a general description of the
    problem are provided. That is, there's no guarantee that someone here will
    be able to solve your problem if you provide a concise, but precise
    description with necessary detail -- but it is unlikely that anyone CAN with
    no more information than this.

    Please clarify so someone will have a chance at helping. Show the code. Show
    the specific line where the error occurs. Show the specific error, number
    and description, if applicable.

    Larry Linson
    Microsoft Access MVP

    "Gianluca L. Monteleone" <glgm@gmx.net > wrote in message
    news:55439b4c.0 401200541.338f7 687@posting.goo gle.com...[color=blue]
    > Hi Folks!
    >
    > I have this strange error that happens after conversion from A97 to
    > AXP (2000-Format). Looks like a bug to me - I've lost 3 days with no
    > result.
    >
    > I use a form with 2 subforms on it, one to set criterias and one that
    > reflects data upon selected criterias. This works perfectly. But
    > sometimes I need to get started with an already "restricted " dataset.
    > So what I do is to change at run-time the form.subform.re cordset
    > property from qmyQuery to something like SELECT * FROM qmyQuery WHERE
    > fld = ...
    >
    > This is done in the Form_Load Event of the parent form through a call
    > to a generic procedure (Me as argument). As soon as it get's back the
    > Me object is invalid. I tracked the problem down to the line of code
    > where value Datasource of subform is changed.
    >
    > This worked perfectly in A97.
    >
    > Please help, I need to switch to AXP soon.
    >
    > Thank you very much.
    > Gianluca L. Monteleone[/color]


    Comment

    • MacDermott

      #3
      Re: Err 2467 and Recordsource change - BUG???

      I suspect you haven't been fully accurate in your terminology here.

      You write:[color=blue]
      > So what I do is to change at run-time the form.subform.re cordset
      > property from qmyQuery to something like SELECT * FROM qmyQuery WHERE
      > fld = ...[/color]
      In Access 97, forms did not expose a property named Recordset, so it's
      unlikely that any code changing that property would have run.

      Later, you write:[color=blue]
      >I tracked the problem down to the line of code
      > where value Datasource of subform is changed.[/color]
      Again, Datasource is not an exposed property of forms in any version of
      Access I know of.

      Perhaps if you posted some actual code...

      - Turtle


      "Gianluca L. Monteleone" <glgm@gmx.net > wrote in message
      news:55439b4c.0 401200541.338f7 687@posting.goo gle.com...[color=blue]
      > Hi Folks!
      >
      > I have this strange error that happens after conversion from A97 to
      > AXP (2000-Format). Looks like a bug to me - I've lost 3 days with no
      > result.
      >
      > I use a form with 2 subforms on it, one to set criterias and one that
      > reflects data upon selected criterias. This works perfectly. But
      > sometimes I need to get started with an already "restricted " dataset.
      > So what I do is to change at run-time the form.subform.re cordset
      > property from qmyQuery to something like SELECT * FROM qmyQuery WHERE
      > fld = ...
      >
      > This is done in the Form_Load Event of the parent form through a call
      > to a generic procedure (Me as argument). As soon as it get's back the
      > Me object is invalid. I tracked the problem down to the line of code
      > where value Datasource of subform is changed.
      >
      > This worked perfectly in A97.
      >
      > Please help, I need to switch to AXP soon.
      >
      > Thank you very much.
      > Gianluca L. Monteleone[/color]


      Comment

      • Gianluca L. Monteleone

        #4
        Re: Err 2467 and Recordsource change - BUG???

        Sorry, what I meant was MyForm.MySubFor m.Form.RecordSo urce=...
        Anyway, I found a workaround by setting RecordSource to a dummy value
        and then setting it to the actual SQL string. It work's this way, but
        still seems to me as if there's a bug in DAO 3.6/AXP.
        Thank you for your reply.
        -- Gianluca L. Monteleone

        Comment

        • adolph

          #5
          Re: AXP: Err 2467 and Recordsource change - BUG???

          I had this same issue. Found that my issue was using the instr()
          function in the source query. It worked on my win2000/accessXP but
          instr() does not work on the Win98/access2000. In essence what s
          happening is that the subform is failing to load and therefor can't be
          seen from the main forms VBA code. Verify that your subform can open.

          Adolph
          glgm@gmx.net (Gianluca L. Monteleone) wrote in message news:<55439b4c. 0401200541.338f 7687@posting.go ogle.com>...[color=blue]
          > Hi Folks!
          >
          > I have this strange error that happens after conversion from A97 to
          > AXP (2000-Format). Looks like a bug to me - I've lost 3 days with no
          > result.
          >
          > I use a form with 2 subforms on it, one to set criterias and one that
          > reflects data upon selected criterias. This works perfectly. But
          > sometimes I need to get started with an already "restricted " dataset.
          > So what I do is to change at run-time the form.subform.re cordset
          > property from qmyQuery to something like SELECT * FROM qmyQuery WHERE
          > fld = ...
          >
          > This is done in the Form_Load Event of the parent form through a call
          > to a generic procedure (Me as argument). As soon as it get's back the
          > Me object is invalid. I tracked the problem down to the line of code
          > where value Datasource of subform is changed.
          >
          > This worked perfectly in A97.
          >
          > Please help, I need to switch to AXP soon.
          >
          > Thank you very much.
          > Gianluca L. Monteleone[/color]

          Comment

          Working...