Solved

run time error

Posted on 2006-11-29
4
359 Views
Last Modified: 2008-01-09
Hi experts
im not even sure if this is right place to post my question but i hope someone can help me. im generating crystal reports version 10 from MS access as front end and SQL is used as the back end. i got three combo boxes
parent accounts(coming from a table)--- report end date(only one value) --schedules(reports-manually typed). Following is my entire VB code

ption Compare Database
'Option Explicit

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
   
    strReport = Forms![Mainform]![cbo_Schedules].Value
   

Set crxreport = crxapplication.OpenReport("reports path" & strReport & ".rpt")
crxreport.ParameterFields.GetItemByName("account_parent").AddCurrentValue Forms![Mainform]![cbo_ParentAccounts].Value
'crxreport.ParameterFields.GetItemByName("report_end_dt").AddCurrentValue Forms![Mainform]![cbo_report_enddt].Value
CrystalActiveXReportViewer1.ReportSource = crxreport
CrystalActiveXReportViewer1.ViewReport
CrystalActiveXReportViewer1.Zoom (100)

The problem i have is that im able to view the reports once fine but when i choose the same account for other reports or just choose any other account from the drop down i get this error

run-time error '-2147189553 (80047ccf):
the value or range you are adding has already existed
any kind of help would be highly appreciated
0
Comment
Question by:zafridi
4 Comments
 
LVL 34

Accepted Solution

by:
jefftwilley earned 500 total points
ID: 18039673
You probably want to close your recordset and the app once the code has ran. Sounds like the occurance of CRAXDRT remains open.
J
0
 
LVL 84
ID: 18039677
Which line does the error occur on?
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 18039691
I'm not familiar using Access  with Crystal. You might want to question to the Crystal Reports TA. http://www.experts-exchange.com/Databases/Crystal_Reports/ 
0
 
LVL 39

Expert Comment

by:stevbe
ID: 18039816
<aside>
just out of curiosity, why use Crystal instead of the report engine inside Access itself?
</aside>
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question