Hi all members
 
Sorry that I'm presenting my problem again. Is there anyone with some suggestions as to how I can have the chart work if the underlying SQL statement is in Visual Basic? The problem is given below but I can re-state it if necessary. All I want is to enable the user to enter up to 3 parameters against which the graph should be plotted. If the SQL statement given below can work then the rest will be easier for me.
 
Thanks in advance
 
Liveson
 
----- Original Message -----
From: Liveson
Sent: Monday, December 12, 2005 6:57 PM
Subject: Re: [DevAccess] PLOTTING GRAPH

Hi Valentin and all members
 
Thanks for your response. The reason I placed that in the row source of the OLE object is that Access put it there in the first place. Now following your instructions I've placed the statement in the record source of the report  like Me.RecordSource = stRowSource where stRowSource is the SQL statement I gave earlier. But still I'm getting an error which says "An error occurred while sending data to the OLE server (the application used to create the object). You may have tried to send too much data." etc, etc. I must admit here that I'm not familiar with creating charts in Access even though I've developed several Access applications.
 
Your help will be highly appreciated
 
Liveson
 
----- Original Message -----
Sent: Monday, December 12, 2005 3:45 PM
Subject: Re: [DevAccess] PLOTTING GRAPH

Liveson,
 
you must use the RecordSource report's property, the RowSource is for Combo or List boxes not for reports.
 
Regards,
 
Valentín Playá
Madrid, Spain
****************************************************************************************************
On 12/12/05, Liveson <[EMAIL PROTECTED]> wrote:
 
Hi
 
I've a problem. I'm trying to plot a graph based on a query. The plotting of the graph is quite OK when the row source is automatically placed in the property sheet of the report. Now for some reason I'd like to change the row source depending on a user's choice so I've placed the row source statement in Visual Basic (OnOpen event). I simply copied and pasted the SQL statement that Access placed on the property sheet and changed some bits. When I try to open the report I get this error "You entered an _expression_ that has an invalid reference to the property row source". What am I not doing right? Here is the code
 
Private Sub Report_Open(Cancel As Integer)
Dim stRowSource As String
stRowSource = "SELECT (Format([Tsiku]," & Chr(34) & "MMM 'YY" & Chr(34) & ")),Sum([Carbonate]) AS [SumOfCarbonate] "
stRowSource = stRowSource & "FROM [Calculations]   GROUP BY (Year([Tsiku])*12 + Month([Tsiku])-1), "
stRowSource = stRowSource & "(Format([Tsiku]," & Chr(34) & "MMM 'YY" & Chr(34) & "));"
Me.Graph0.RowSource = stRowSource
 
End Sub
 
Tsiku is Date,  Carbonate is the item against which I want to plot the graph and Calculations is a query.
 
Thanks in advance
 
Liveson Tumbulu
 


YAHOO! GROUPS LINKS








Please zip all files prior to uploading to Files section.




SPONSORED LINKS
Microsoft access developer Microsoft access help Microsoft access database
Microsoft access training Microsoft access training course Microsoft access programming


YAHOO! GROUPS LINKS




Reply via email to