in reply to Changing a MS-Access report's RecordSource property

check $access->{Reports}->Item(1), it looks as if this is undef;

regards,
tomte


Hlade's Law:

If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.

  • Comment on Re: Changing a MS-Access report's RecordSource property

Replies are listed 'Best First'.
Re: Re: Changing a MS-Access report's RecordSource property
by Grygonos (Chaplain) on Jun 24, 2003 at 15:48 UTC
    I have tried doing it without the curly braces on Reports and it doesn't make any difference.

    The application method has a property called reports which is a report collection for the application (which I would guess means in relation to the current database, which should be the one I opened) Then the reports object has a method Item(n) where n is the item you want to view from the collection. I know the report is defined and is there... and it starts at subscript 1.. and not 0. sorry I double checked and M$ is inconsistent... for some ole it is 1 and others 0 .. this happens to be zero... and it says of currently open reports... maybe I have to find a method to open it ;)

    There is a method in Access.Application called currentDB which returns a DAO object of type Database. DAO object database doesn't seem to have any method of referencing the reports contained in the database... any more ideas?

      Nope, I'm sorry :(
      I'm WinFree? since two and a half years or so, I just spotted the obvious cause. A quick glance over the net didn't make me smarter about OLE-Programming...well, how could it?

      again, sorry...I guess following VSarkiss advice and scanning available info (along with putting a lot of debug-prints/dies into the code) is the stony way you have to go

      regards,
      tomte


      Hlade's Law:

      If you have a difficult task, give it to a lazy person --
      they will find an easier way to do it.