Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Posts
    5

    HOW DO I: Add or Launch Report from a Form?

    I have an Access 2003 form and I have created a Report.


    I cannot figure out how to put the Report or a way to launch it on my Form.

    Also.......
    I need to pass a Date to the Report.
    I have a Date Picker and Launch button on my Form.
    I just can't find the control for a Report.


    I appreciate any help.

  2. #2
    Join Date
    Sep 2006
    Location
    dallas
    Posts
    14
    When you choose a command button the command button wizard should pop up. on it choose report operations. Simpliest way i know how.

  3. #3
    Join Date
    Sep 2006
    Posts
    5
    Thanks....
    I finally got it.
    Instead of PASSING the data, the Query reads it from the Form textbox.

    Below is relevant code:

    QUERY: GetPastDueWithDateParam [SQL View]
    SELECT Owners.PermissionRenewalDueDate, Owners.*
    FROM Owners
    WHERE (((Owners.PermissionRenewalDueDate)<[Forms]![Permission Form]![txtRenewalDateCompareDate]));



    REPORT: GetPastDueByDateRpt

    FORM: Permission Form
    VBA Code:

    '********************************************
    ' Launch the GetPastDueByDateRpt Report
    '********************************************

    Private Sub btnLaunchRenewalDueRpt_Click()

    On Error GoTo Err_btnLaunchRenewalDueRpt_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "GetPastDueByDateRpt"

    ' IMPORTANT: Do NOT delete EMPTY params (commas) in the DoCmd.OpenReport call
    DoCmd.OpenReport stDocName, acViewPreview, , , acWindowNormal

    Exit_btnLaunchRenewalDueRpt_Click:
    Exit Sub

    Err_btnLaunchRenewalDueRpt_Click:
    MsgBox Err.Description
    Resume Exit_btnLaunchRenewalDueRpt_Click

    End Sub

    '********************************************


    I hope that somone finds this useful.

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

Similar Threads

  1. Replies: 0
    Last Post: 10-24-2008, 11:20 AM
  2. Replies: 0
    Last Post: 08-26-2008, 09:22 AM
  3. Access VBA form/report
    By justaguy in forum Programming
    Replies: 0
    Last Post: 08-18-2008, 09:57 AM
  4. Replies: 0
    Last Post: 01-18-2007, 07:07 PM
  5. Run report or sub form during data entry
    By wasim_sono in forum Programming
    Replies: 0
    Last Post: 03-09-2006, 05:40 AM

Posting Permissions

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