Solved

run time error

Posted on 2006-11-29
4
362 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 85
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

630 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