Solved

run time error

Posted on 2006-11-29
4
350 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now