Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    using sql to set a a reports recordsource (Access 2003 )

    Using this code as part of a module to open a report in print preview and set it's recordsource to the sql I have written earlier in the code. The problem is when I run this it only prints the report it won't show it to me in print preview like I want. Anybody know what's wrong? Thanks...


    DoCmd.OpenReport "SitesIssues_qry", acViewNormal, "", "", acNormal
    Me.RecordSource = strsql & " " & strWhere & "" & strOrder

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: using sql to set a a reports recordsource (Access 2003 )

    AcviewNormal sends it to the printer.

    DoCmd.OpenReport "SitesIssues_qry", acViewPeview,

    Does the other part of what you are trying to do work?
    Regards
    John



Posting Permissions

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