Results 1 to 3 of 3
  1. #1
    95DSM is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2010
    Posts
    37

    Open Querry that looks nice???


    Is there a way to have a button on a Form that opens a Form in Report view. I know you can open Queries and Tables with a button, but is there a way to open a Report? I have a Report linked to a Querry with certain parameters and would like to be able to click a button in my Form and see my Query pop up nice and clean whether it be in Report view or another style.

    Thanks for any suggestions!

  2. #2
    95DSM is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2010
    Posts
    37
    This is the code I have behind the button...

    Sub Command129_Click(oEvent As Object)
    Dim RptName As String
    RptName = "SearchManuQuery"
    'the name of the report I want to open
    MyDatabase.ReportDocuments.getByName(SearchManuQue ry).Open
    End Sub

    I get the following error(See pic)

  3. #3
    dsmacs is offline Advanced Beginner
    Windows XP Access 2010 (version 14.0)
    Join Date
    Oct 2009
    Location
    Perth Western Australia
    Posts
    52
    Try this

    Sub Command129_Click()
    Dim RptName As String
    RptName = "SearchManuQuery" 'the name of the report I want to open

    docmd.openreport RptName, acPreview
    End Sub

    Cheers
    Darren

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Open a second db from a cmd button
    By Rick West in forum Access
    Replies: 3
    Last Post: 05-12-2010, 08:44 AM
  2. Replies: 2
    Last Post: 02-26-2010, 08:14 AM
  3. Querry IIf Output Format (Access 2003)
    By Bruce in forum Access
    Replies: 2
    Last Post: 12-03-2009, 06:52 PM
  4. Replies: 1
    Last Post: 06-04-2009, 07:43 AM
  5. Querry formating
    By Zoroxeus in forum Queries
    Replies: 0
    Last Post: 03-07-2006, 11:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums