Show query Parameter in Chart?

R

Rohn

Is it possible to display and print the Query Parameter on a chart? I
would like to have the Year and Month that the user selected displayed and
printed on the chart! but can't figure out how. Here are the two query
fields and the parameters.

Query is: Year: Format([dbo_FRDF_DETAILS.RECORD_CREATE_DATE],"yyyy")
Parameter: Like [Type year 2006, 2007, or 2008] & "*"

Query is: Month: Format([dbo_FRDF_DETAILS.RECORD_CREATE_DATE],"mmm")
Parameter: Like [Type Jan, Feb, or Mar for Month] & "*"


Thanks to all of you gurus who spend time helping people like me!
Rohn
 
R

Rohn

I did just see this posting. But I don't have a form set up for selection,
DO I NEED TO?

Matt Wickham said:
If your query uses a form (like Report Date Range) to prompt for the date,
you can add a text box in design mode in the report header with a Control
Source of something like:

="For Data Between: " & Format([Forms]![Report Date Range]![Beginnining
Date],"m/d/yy") & " and " & Format([Forms]![Report Date Range]![Ending
Date],"m/d/yy")





Rohn said:
Is it possible to display and print the Query Parameter on a chart? I
would like to have the Year and Month that the user selected displayed and
printed on the chart! but can't figure out how. Here are the two query
fields and the parameters.

Query is: Year: Format([dbo_FRDF_DETAILS.RECORD_CREATE_DATE],"yyyy")
Parameter: Like [Type year 2006, 2007, or 2008] & "*"

Query is: Month: Format([dbo_FRDF_DETAILS.RECORD_CREATE_DATE],"mmm")
Parameter: Like [Type Jan, Feb, or Mar for Month] & "*"


Thanks to all of you gurus who spend time helping people like me!
Rohn
 
D

Douglas J. Steele

No, you can refer to your parmeter names:

="For data in " & [Type Jan, Feb, or Mar for Month] & " of " & [Type year
2006, 2007, or 2008]

Just make sure you type the prompts exactly the same in both places!

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Rohn said:
I did just see this posting. But I don't have a form set up for selection,
DO I NEED TO?

Matt Wickham said:
If your query uses a form (like Report Date Range) to prompt for the
date, you can add a text box in design mode in the report header with a
Control Source of something like:

="For Data Between: " & Format([Forms]![Report Date Range]![Beginnining
Date],"m/d/yy") & " and " & Format([Forms]![Report Date Range]![Ending
Date],"m/d/yy")





Rohn said:
Is it possible to display and print the Query Parameter on a chart? I
would like to have the Year and Month that the user selected displayed
and printed on the chart! but can't figure out how. Here are the two
query fields and the parameters.

Query is: Year: Format([dbo_FRDF_DETAILS.RECORD_CREATE_DATE],"yyyy")
Parameter: Like [Type year 2006, 2007, or 2008] & "*"

Query is: Month: Format([dbo_FRDF_DETAILS.RECORD_CREATE_DATE],"mmm")
Parameter: Like [Type Jan, Feb, or Mar for Month] & "*"


Thanks to all of you gurus who spend time helping people like me!
Rohn
 
R

Rohn

I tried [Year] which is the parameter name and I get #Name? in my text box
in the chart? Obviously, I am doing something wrong! So I tried using the
Expression Builder with this: = [(Q)Chart_System]![Year] and get the same
#Name? error.

What did I miss?

Thanks again for the assistance,
Rohn

Douglas J. Steele said:
No, you can refer to your parmeter names:

="For data in " & [Type Jan, Feb, or Mar for Month] & " of " & [Type year
2006, 2007, or 2008]

Just make sure you type the prompts exactly the same in both places!

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Rohn said:
I did just see this posting. But I don't have a form set up for
selection, DO I NEED TO?

Matt Wickham said:
If your query uses a form (like Report Date Range) to prompt for the
date, you can add a text box in design mode in the report header with a
Control Source of something like:

="For Data Between: " & Format([Forms]![Report Date Range]![Beginnining
Date],"m/d/yy") & " and " & Format([Forms]![Report Date Range]![Ending
Date],"m/d/yy")





Rohn said:
Is it possible to display and print the Query Parameter on a chart? I
would like to have the Year and Month that the user selected displayed
and printed on the chart! but can't figure out how. Here are the two
query fields and the parameters.

Query is: Year: Format([dbo_FRDF_DETAILS.RECORD_CREATE_DATE],"yyyy")
Parameter: Like [Type year 2006, 2007, or 2008] & "*"

Query is: Month: Format([dbo_FRDF_DETAILS.RECORD_CREATE_DATE],"mmm")
Parameter: Like [Type Jan, Feb, or Mar for Month] & "*"


Thanks to all of you gurus who spend time helping people like me!
Rohn
 
R

Rohn

This is a Chart without a Record Source for the data. and in the Detail
section is the "OLEUnbound0" Chart and the row source set to: SELECT
[Category_A],Sum([CountOfCategory_A]) AS [SumOfCountOfCategory_A] FROM
[(Q)Chart_System] GROUP BY [Category_A];

This might help figure out why I can not view a reference to my query
parameters.

Thanks, Rohn

Douglas J. Steele said:
No, you can refer to your parmeter names:

="For data in " & [Type Jan, Feb, or Mar for Month] & " of " & [Type year
2006, 2007, or 2008]

Just make sure you type the prompts exactly the same in both places!

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Rohn said:
I did just see this posting. But I don't have a form set up for
selection, DO I NEED TO?

Matt Wickham said:
If your query uses a form (like Report Date Range) to prompt for the
date, you can add a text box in design mode in the report header with a
Control Source of something like:

="For Data Between: " & Format([Forms]![Report Date Range]![Beginnining
Date],"m/d/yy") & " and " & Format([Forms]![Report Date Range]![Ending
Date],"m/d/yy")





Rohn said:
Is it possible to display and print the Query Parameter on a chart? I
would like to have the Year and Month that the user selected displayed
and printed on the chart! but can't figure out how. Here are the two
query fields and the parameters.

Query is: Year: Format([dbo_FRDF_DETAILS.RECORD_CREATE_DATE],"yyyy")
Parameter: Like [Type year 2006, 2007, or 2008] & "*"

Query is: Month: Format([dbo_FRDF_DETAILS.RECORD_CREATE_DATE],"mmm")
Parameter: Like [Type Jan, Feb, or Mar for Month] & "*"


Thanks to all of you gurus who spend time helping people like me!
Rohn
 
D

Douglas J. Steele

In your example, the parameter isn't named Year. It's named [Type year 2006,
2007, or 2008].

BTW, don't use Year as field. Year is a reserved word, and you should never
use reserved words for your own purposes. For a comprehensive list of names
to avoid, see what Allen Browne has at
http://www.allenbrowne.com/AppIssueBadWord.html

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Rohn said:
This is a Chart without a Record Source for the data. and in the Detail
section is the "OLEUnbound0" Chart and the row source set to: SELECT
[Category_A],Sum([CountOfCategory_A]) AS [SumOfCountOfCategory_A] FROM
[(Q)Chart_System] GROUP BY [Category_A];

This might help figure out why I can not view a reference to my query
parameters.

Thanks, Rohn

Douglas J. Steele said:
No, you can refer to your parmeter names:

="For data in " & [Type Jan, Feb, or Mar for Month] & " of " & [Type year
2006, 2007, or 2008]

Just make sure you type the prompts exactly the same in both places!

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Rohn said:
I did just see this posting. But I don't have a form set up for
selection, DO I NEED TO?

If your query uses a form (like Report Date Range) to prompt for the
date, you can add a text box in design mode in the report header with a
Control Source of something like:

="For Data Between: " & Format([Forms]![Report Date Range]![Beginnining
Date],"m/d/yy") & " and " & Format([Forms]![Report Date Range]![Ending
Date],"m/d/yy")

--
ProRules, LLC
www.prorules.com





Is it possible to display and print the Query Parameter on a chart? I
would like to have the Year and Month that the user selected displayed
and printed on the chart! but can't figure out how. Here are the two
query fields and the parameters.

Query is: Year: Format([dbo_FRDF_DETAILS.RECORD_CREATE_DATE],"yyyy")
Parameter: Like [Type year 2006, 2007, or 2008] & "*"

Query is: Month: Format([dbo_FRDF_DETAILS.RECORD_CREATE_DATE],"mmm")
Parameter: Like [Type Jan, Feb, or Mar for Month] & "*"


Thanks to all of you gurus who spend time helping people like me!
Rohn
 
R

Rohn

Thanks Doug.... I did change [Year] to [FiscalYear] so that I am not using
a reserved word.

in my chart I still can not get the [Type year 2006, 2007, or 2008] to give
anything but #Name? I did copy and paste the parameter so that it is
exactly the same as the query and still nothing?

I shifted gears and built a form that populates the query results for the
chart and it works fine... one extra step but it works.

Have a safe 4th of July
Rohn

Douglas J. Steele said:
In your example, the parameter isn't named Year. It's named [Type year
2006, 2007, or 2008].

BTW, don't use Year as field. Year is a reserved word, and you should
never use reserved words for your own purposes. For a comprehensive list
of names to avoid, see what Allen Browne has at
http://www.allenbrowne.com/AppIssueBadWord.html

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Rohn said:
This is a Chart without a Record Source for the data. and in the Detail
section is the "OLEUnbound0" Chart and the row source set to: SELECT
[Category_A],Sum([CountOfCategory_A]) AS [SumOfCountOfCategory_A] FROM
[(Q)Chart_System] GROUP BY [Category_A];

This might help figure out why I can not view a reference to my query
parameters.

Thanks, Rohn

Douglas J. Steele said:
No, you can refer to your parmeter names:

="For data in " & [Type Jan, Feb, or Mar for Month] & " of " & [Type
year 2006, 2007, or 2008]

Just make sure you type the prompts exactly the same in both places!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top