[AccessD] Graph Rowsource

dmcafee at pacbell.net dmcafee at pacbell.net
Mon Jun 27 01:21:15 CDT 2005


Are you sure you have an input parameter that is set to an INT and not a
VARCHAR?

Make sure the top line looks like this:

ALTER PROCEDURE sprptIncomeNeedsChart (@txtClientIDNo AS INT) AS

Then in your report, opent he properties box and in the Data tab, you can
type in an Input parameter in either of the following manners:

		@txtClientIDNo = 1234
			or
		@txtClientIDNo = Forms![SomeForm]![txtClientIDNo]

Its late, and I'm not getting everything through my thick skull right now.
I'll take a look at it on the morning if nobody else has chimed in.

David




-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of David Emerson
Sent: Sunday, June 26, 2005 10:40 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Graph Rowsource


Running with this idea, how do I pass a parameter to the sproc.  In the
recordsource I have:

EXEC dbo.sprptIncomeNeedsChart ClientIDNo

but it seems to be treating the field (ClientIDNo) as a varchar value
('ClientIDNo'), not an integer (which the value is)

I can't include the ClientIDNo field in the sproc and use child and master
fields because I can't work out how not to include that field in the data
being used in the graph itself.

Here is the main part of the sproc:

SELECT C1stName, CDisIncome AS [Required Funds], CDisIncP + CDisLumpSum +
CDisSuper + CDisOtherInc AS [Available Funds]
FROM vwCashManagement
WHERE ClientIDNo = @txtClientIDNo
UNION SELECT P1stName, PDisIncome AS [Required Funds], PDisIncC +
PDisLumpSum + PDisSuper + PDisOtherInc AS [Available Funds]
FROM vwCashManagement
WHERE ClientIDNo = @txtClientIDNo


David

At 27/06/2005, you wrote:
>Why don't you make the row source a Stored Procedure (sproc) and have the
>sproc do the correct SELECT for you? That way you don't need to anything
>fancy in the FE. I tend to not give users select rights to tables and make
>everything sproc driven.
>
>D
>
>-----Original Message-----
>From: accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of David Emerson
>Sent: Sunday, June 26, 2005 7:44 PM
>To: accessd at databaseadvisors.com
>Subject: [AccessD] Graph Rowsource
>
>
>AccessXP ADP,  SQL2000
>
>I am trying to change a graphs rowsource via VBA.   When I have the
>following in the Detail_Format section of the report -
>
>      Me!chtincNeeds.RowSource = "SELECT C1stName ...  " (Rest of query
>omitted)
>
>I get an error 2191 - You can't set the rowsource property in print preview
>or after printing has started.
>
>If I put it on the report's on open event I get error 2455 - You entered an
>expression that has an invalid reference to the property RowSource.
>
>How can I dinamically change the rowsource?
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list