?
Solved

run time error

Posted on 2006-11-29
4
Medium Priority
?
368 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 1500 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

719 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