Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Sep 2005
    Location
    North Carolina, USA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form with cbo box calls report (2003)

    I know I

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form with cbo box calls report (2003)

    I don't understand why you change the row source of the combo box in the After Update event of the combo box itself.

    I wouldn't open the report in the After Update event of the combo box, it doesn't allow the user to correct a mistake. Instead, I would put a command button with a caption such as "Open Report" next to the combo box. Open the report in the On Click event procedure of the command button.

    To open the report for a specific project, you must provide the WhereCondition argument of DoCmd.OpenReport.

    Private Sub cmdReport_Click()
    DoCmd.OpenReport ProjectReport, acViewPreview, , "ProjectName = " & Chr(34) & Me.cboProjectName & Chr(34)
    End Sub

    The cboProjectName_AfterUpdate event procedure can be removed now.

  3. #3
    New Lounger
    Join Date
    Sep 2005
    Location
    North Carolina, USA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form with cbo box calls report (2003)

    you're wonderful! thank you very much, in case anyone elses uses this.. I only had to put quotes around the report name to get it to run.

    I've been trying to get this working for a while now, thanks again.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form with cbo box calls report (2003)

    Since you said you already had it working, I assumed that ReportName was a global variable...

  5. #5
    New Lounger
    Join Date
    Sep 2005
    Location
    North Carolina, USA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form with cbo box calls report (2003)

    Keep in mind I had it working but had no idea how or why [img]/forums/images/smilies/smile.gif[/img]

Posting Permissions

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