Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2014
    Posts
    2

    Unanswered: Help with command button and listbox selection

    Hi, new to the forum here. I am looking for assistance setting up a command button to open a report based on a selection from a listbox. In my listbox called lstDetailedCharts i have 3 reports populating the list. I am unable however to successfully use a command button to open whichever of the 3 reports I've selected. I know how to setup a basic command button to open a single report but not one based on a user selection. Any help/guidance greatly appreciated. Thank you.

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    Have a table tReports:
    name, report

    The list box uses this table as its data source (with report as the bound column),
    the user picks the name,
    the button will open the report as docmd.openreport lstDetailedCharts , acViewPreview

  3. #3
    Join Date
    Jul 2014
    Posts
    2
    Thank you so much for your reply. I've got it working now. I couldn't figure out that little bit of VBA you provided and of course was thinking it was a much bigger task than it was.

Tags for this Thread

Posting Permissions

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