Parametric Report

Discussion in 'AutoCAD' started by Kumar, Feb 11, 2004.

  1. Kumar

    Kumar Guest

    It is extension of yesterday's post "Create report in VBA". Now I can open report from VBA using given code:
    Dim access As access.Application
    Set access = New access.Application
    access.Visible = True
    access.OpenCurrentDatabase ("D:\Thesis\AutoCad Examples\Kumar\DrawingInfo.mdb")
    access.DoCmd.OpenReport "CityOfficerQuery1", acViewPreview
    'access.DoCmd.OpenReport "CityOfficerQuery1", acViewPreview, , CityOfficerQuery1.Parameters("[Enter ProjectID]") = UserForm2.CmbBoxReportProjectID.ListUserForm2.CmbBoxReportProjectID.ListIndex)

    UserForm2.hide

    Report which I want to run is derived from parametric query and each time it asks for parametre but I want it be directly feed from code as parameter is equal to item set from Combobox.I know how to do with query but don't know how to feed parameter for reports??
    Does any body have idea for this??
     
    Kumar, Feb 11, 2004
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.