Results 1 to 6 of 6

Thread: Select Report

  1. #1
    Join Date
    Oct 2003
    Location
    London
    Posts
    341

    Unanswered: Select Report

    Hi guys.

    I have to produce a frequent report using access, to do what I wanted it to do i needed to produce 6 different reports. I got annoyed at opening one and printing, then opening the second etc. so I created another form which included the six as subreports.

    Now I've been thinking, what happens if I only want to print 2 of these reports, or 3 etc. Is there a way that on a form I can select which reports I would like to print (maybe a tick box). Ideally I'd like them all to run in the large report still as this creates a constant page number.

    My idea was that I could put a code into each section saying if tick box on form is yes, make this visible, if not Not visible.

    Any help or suggestions as to how I can do this?

    Regards

    Christy

  2. #2
    Join Date
    Jul 2004
    Posts
    125
    The best way is to create a listbox where MultiSelect is set to Extended. The List box's rowsource is a Value list of the (sub)report names. Hide the form when calling the report and in the report's Open event, read the selections of the hidden form. You can then cycle through each row of the listbox' selected report name as: If .Selected = True Then .Visible = True.

  3. #3
    Join Date
    Oct 2003
    Location
    London
    Posts
    341
    Ok sounds cool.

    I call the report from the form FRM_NAV_Report and the list box is now called Val_ReportSelect

    The main report which contains all the (sub)reports is called Rpt_FullReport and each (sub)report is Rpt_Section1, Rpt_Section2 etc...

    I've opened Rpt_FullReport and attempted to put the if code in the on open() however, I'm having problems relating the code to a) the multi select list and b) the sections within Rpt_FullReport.

    Could you help?

  4. #4
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    I have a DB with 10 reports, what I did was make a table with the actual report name (i.e., EmployeeBadgeExp), a neater name of it (Employee Badge Expirations), and a short description (The badge number and expiration dates of employees). Then made a form with a combo box that held the neater name, a txtbox that had the description and a button to open it. In your case make it a print button...
    Ryan
    My Blog

  5. #5
    Join Date
    Oct 2003
    Location
    London
    Posts
    341
    Can someone help me with writing the visible=True section?

    I don't know how I can say make this section invisible if this tick box is no in code.

    Been trying, but I what I know of VB is what I have been picking up on my way, I have no prior knowledge of VB.

  6. #6
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Hi,

    On my form I have a CheckBox that is called "Complete" and also a date field called "CompletedDate" What I wanted was when I check the Complete ComboBox to place the CurrentDate in the CompletedDate field. So, in VBA I said this:
    Code:
    Private Sub Complete_AfterUpdate()
    
       If Complete = -1 Then     'If the Complete box is checked.
       CompletedDate = Date()  'Place the current date in this field 
      Else
       If Complete = 0 Then      'If the Complete box is unchecked.
       CompletedDate = ""        'Leave this field blank 
      End If
    
    End Sub
    Tried to make it very easy here, but if you still need help then let me know and will try to help more. Or post a sample of your database for someone to fix for you.

    have a nice day,
    Bud

Posting Permissions

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