+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Spammer
    Join Date
    02-26-2009
    Location
    U.S
    MS-Off Ver
    Outlook
    Posts
    59

    How can i Select a Report From Dropdown

    Hi everyone,

    I have inherited a database that has a list of reports in a drop down. Whenever I select a report, the preview window will open but it will automatically default to the first report on the drop down list (even if I selected the 5th). How can I open ONLY the one selected from the drop down, rather than all of them each time (regardless of which I chose)?

    The query behind the drop down is:
    Code:
    SELECT [Overall Rankings].[Site ID], [Overall Rankings].[Site Name], [Overall Rankings].Address, [Overall Rankings].City
    FROM [Overall Rankings]
    ORDER BY [Overall Rankings].[Site ID];
    The code behind the button opening the report is:

    Code:
    Private Sub btn_ViewSiteSummary_Click()
    On Error GoTo Err_btn_ViewSiteSummary_Click
    
    Dim stDocName As String
    
    stDocName = "Site File Review Summary Report"
    DoCmd.OpenReport stDocName, acPreview

  2. #2
    Valued Forum Contributor
    Join Date
    04-23-2009
    Location
    IOWA
    MS-Off Ver
    2010 Professional
    Posts
    233

    Re: How can i Select a Report From Dropdown

    Just at first glance. You are opening only one report, there is only one report, what you want to change is which website you are viewing the report for. Am I correct in my assumptions there?

    Also if you want it to designate which data to open you need to set the Criteria in your DoCmd.OpenReport statment.

    Hope this helps,

    Dan
    "I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
    If my advice has been helpful to you, then please help me by clicking on the scales and adding to my reputation, Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0