Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2012
    Posts
    2

    Unanswered: Multiple MultiSelect ListBoxes to PDFs

    Let me start by saying that I'm new to the forum and Im so hoping that someone can lead me in the right direction. I'm a novice at writing vba, but I've been tasked with creating a batch reporting database dashboard. I have a budget database where we have over 60 accounts and for each account we have multiple reports. I need to be able to have the user select x number of accounts from a list box, as well multiple months and which reports they'd like. Can this be done? I got it to work with using a form (frmSelectCCToPrint), but I need the user to be able to select multi values from multiple list boxes (frmReportingDashboardCriteria). Each month i have to run at least 6 reports for over 60 accounts.

    So i have 3 multiselect List boxes on my Dashboard form:
    CCListbox
    MonthListbox
    ReportList

    Based on the report the user selects (sql will change), the pdfs will be created for each CC and month. I'm confused on where to start and how to incorporate all this into one. HELPPPPP!!!!!!
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7
    Just point the where side of the SQL to the from feilds Then run the SQL (query )
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    994
    Provided Answers: 2
    Looks like this will require some nested loop structures. Loop though the reports, customers and months. In the middle of the loops, construct a SQL statement that uses the current customer and month combination, and applies it to the current report. Then use that SQL statement as the data source for the selected report, and export it. Rinse and repeat.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

  4. #4
    Join Date
    Oct 2012
    Posts
    2

    Thanks.

    Quote Originally Posted by weejas View Post
    Looks like this will require some nested loop structures. Loop though the reports, customers and months. In the middle of the loops, construct a SQL statement that uses the current customer and month combination, and applies it to the current report. Then use that SQL statement as the data source for the selected report, and export it. Rinse and repeat.
    Thanks, I will try that. Wish me luck.

Posting Permissions

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