Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using drop down from ms access to get a crystal report

Status
Not open for further replies.

teachmecr

Programmer
Oct 1, 2006
72
US
hi
i have a form in ms access that has a drop down menu(account_id). i want to be able to select one account_id from the drop down and it shud open up a crystal report based on that id. i know i have to make a parameter account_id in the report which i already. im just not sure how integrate it with access. Here is my existing code which just opens a whole report when i click on a button. can plz someone give me the code. thanks.

Option Compare Database
Public crxapplication As New CRAXDRT.Application
Public crxreport As CRAXDRT.Report

Private Sub Form_Load()

'Maximizes the form
DoCmd.Maximize
Me!CrystalActiveXReportViewer1.Top = 600
Me!CrystalActiveXReportViewer1.Left = 800
Me!CrystalActiveXReportViewer1.Height = 8000
Me!CrystalActiveXReportViewer1.Width = 12000
Set crxreport = crxapplication.OpenReport("C:\report1.rpt")
CrystalActiveXReportViewer1.ReportSource = crxreport
CrystalActiveXReportViewer1.ViewReport
CrystalActiveXReportViewer1.Zoom (100)

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top