Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Run timer error 2451 (97)

    Run timer error 2451
    While using a standard code module I keep getting run time error 2451 that the report I

  2. #2
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Run timer error 2451 (97)

    Are you sure your string sql statement is running? The statement is missing a ; at the end of the statement prior to the last "." Since the SQL statement may not execute, access may think the table is not opened even though the report name may be correct.

    ... ON Director.Code = SalesCoordinator.DirectorCode;" - add the ; after the e in Code

    HTH
    Regards,

    Gary
    (It's been a while!)

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run timer error 2451 (97)

    Well, this works:
    DoCmd.OpenReport "rptJunk", acViewPreview, strsql
    And it doesn

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Run timer error 2451 (97)

    You answered your own question, you don't need ,Reports!rptJunk.RecordSource = strSQL at the end of the DoCmd.OpenReport, all you need is the string name ,strSQL.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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