A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Populate report header field from query parameter



 
 
Thread Tools Display Modes
  #1  
Old October 20th, 2004, 04:13 PM
jh
external usenet poster
 
Posts: n/a
Default Populate report header field from query parameter

Hello,

I have a report that populates a field in the header from a report
parameter. This parameter field is a date which is used in the query to pick
up all records with a date prior to the entered parameter date. I am making
the controlsource property in the report field equal to the query parameter
name.

If there are records that meet the query criteria the report field properly
displays the parameter date entered by the user. The problem is when the
query doesn't return any records then the report field doesn't display the
value entered by the user as a parameter date but rather displays #Error.

Thanks

  #2  
Old October 20th, 2004, 04:25 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default

You can't get the parameter to display if there are no records. This is a
good reason to use a reference to a control on a form rather than a prompt.

Consider reviewing this page http://www.fontstuff.com/access/acctut08.htm on
using controls.

--
Duane Hookom
MS Access MVP
--

"jh" wrote in message
...
Hello,

I have a report that populates a field in the header from a report
parameter. This parameter field is a date which is used in the query to
pick
up all records with a date prior to the entered parameter date. I am
making
the controlsource property in the report field equal to the query
parameter
name.

If there are records that meet the query criteria the report field
properly
displays the parameter date entered by the user. The problem is when the
query doesn't return any records then the report field doesn't display the
value entered by the user as a parameter date but rather displays #Error.

Thanks



  #3  
Old October 20th, 2004, 06:55 PM
jh
external usenet poster
 
Posts: n/a
Default

Thanks Duane. I will do that but I do have another question on this issue. Is
it possible to access the parameter value property of a query from within a
report which is bound to that query?


"Duane Hookom" wrote:

You can't get the parameter to display if there are no records. This is a
good reason to use a reference to a control on a form rather than a prompt.

Consider reviewing this page http://www.fontstuff.com/access/acctut08.htm on
using controls.

--
Duane Hookom
MS Access MVP
--

"jh" wrote in message
...
Hello,

I have a report that populates a field in the header from a report
parameter. This parameter field is a date which is used in the query to
pick
up all records with a date prior to the entered parameter date. I am
making
the controlsource property in the report field equal to the query
parameter
name.

If there are records that meet the query criteria the report field
properly
displays the parameter date entered by the user. The problem is when the
query doesn't return any records then the report field doesn't display the
value entered by the user as a parameter date but rather displays #Error.

Thanks




  #4  
Old October 20th, 2004, 07:14 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default

You won't need to. You can just access the control value.

However, if you want to access a parameter prompt value from a query, the
query must return at least one record.

--
Duane Hookom
MS Access MVP
--

"jh" wrote in message
...
Thanks Duane. I will do that but I do have another question on this issue.
Is
it possible to access the parameter value property of a query from within
a
report which is bound to that query?


"Duane Hookom" wrote:

You can't get the parameter to display if there are no records. This is a
good reason to use a reference to a control on a form rather than a
prompt.

Consider reviewing this page http://www.fontstuff.com/access/acctut08.htm
on
using controls.

--
Duane Hookom
MS Access MVP
--

"jh" wrote in message
...
Hello,

I have a report that populates a field in the header from a report
parameter. This parameter field is a date which is used in the query to
pick
up all records with a date prior to the entered parameter date. I am
making
the controlsource property in the report field equal to the query
parameter
name.

If there are records that meet the query criteria the report field
properly
displays the parameter date entered by the user. The problem is when
the
query doesn't return any records then the report field doesn't display
the
value entered by the user as a parameter date but rather displays
#Error.

Thanks






  #5  
Old November 10th, 2004, 09:09 PM
Soto
external usenet poster
 
Posts: n/a
Default

I had the same problem. The parameter did not print because there was no
data. Then I hid a field that should say either "initial", "pending" or
"closed" depending what the user put in the parameter box. Then I referenced
to the box by creating a new text box, but it was still blank, because the
initial field that reads, for example, "initial", did not say that, because
there was no data. Did I miss Duane's answer? The website does not seem to
give answers. What to do?

"Duane Hookom" wrote:

You won't need to. You can just access the control value.

However, if you want to access a parameter prompt value from a query, the
query must return at least one record.

--
Duane Hookom
MS Access MVP
--

"jh" wrote in message
...
Thanks Duane. I will do that but I do have another question on this issue.
Is
it possible to access the parameter value property of a query from within
a
report which is bound to that query?


"Duane Hookom" wrote:

You can't get the parameter to display if there are no records. This is a
good reason to use a reference to a control on a form rather than a
prompt.

Consider reviewing this page http://www.fontstuff.com/access/acctut08.htm
on
using controls.

--
Duane Hookom
MS Access MVP
--

"jh" wrote in message
...
Hello,

I have a report that populates a field in the header from a report
parameter. This parameter field is a date which is used in the query to
pick
up all records with a date prior to the entered parameter date. I am
making
the controlsource property in the report field equal to the query
parameter
name.

If there are records that meet the query criteria the report field
properly
displays the parameter date entered by the user. The problem is when
the
query doesn't return any records then the report field doesn't display
the
value entered by the user as a parameter date but rather displays
#Error.

Thanks







  #6  
Old November 12th, 2004, 06:09 AM
Duane Hookom
external usenet poster
 
Posts: n/a
Default

You can reference the parameter value if the query returns records.

--
Duane Hookom
MS Access MVP


"Soto" wrote in message
...
I had the same problem. The parameter did not print because there was no
data. Then I hid a field that should say either "initial", "pending" or
"closed" depending what the user put in the parameter box. Then I

referenced
to the box by creating a new text box, but it was still blank, because the
initial field that reads, for example, "initial", did not say that,

because
there was no data. Did I miss Duane's answer? The website does not seem to
give answers. What to do?

"Duane Hookom" wrote:

You won't need to. You can just access the control value.

However, if you want to access a parameter prompt value from a query,

the
query must return at least one record.

--
Duane Hookom
MS Access MVP
--

"jh" wrote in message
...
Thanks Duane. I will do that but I do have another question on this

issue.
Is
it possible to access the parameter value property of a query from

within
a
report which is bound to that query?


"Duane Hookom" wrote:

You can't get the parameter to display if there are no records. This

is a
good reason to use a reference to a control on a form rather than a
prompt.

Consider reviewing this page

http://www.fontstuff.com/access/acctut08.htm
on
using controls.

--
Duane Hookom
MS Access MVP
--

"jh" wrote in message
...
Hello,

I have a report that populates a field in the header from a report
parameter. This parameter field is a date which is used in the

query to
pick
up all records with a date prior to the entered parameter date. I

am
making
the controlsource property in the report field equal to the query
parameter
name.

If there are records that meet the query criteria the report field
properly
displays the parameter date entered by the user. The problem is

when
the
query doesn't return any records then the report field doesn't

display
the
value entered by the user as a parameter date but rather displays
#Error.

Thanks









  #7  
Old November 13th, 2004, 05:19 AM
Soto
external usenet poster
 
Posts: n/a
Default

Is there absolutely no workaround to display the parameter on the report if
there is no data? No programming?


"Duane Hookom" wrote:

You can reference the parameter value if the query returns records.

--
Duane Hookom
MS Access MVP


"Soto" wrote in message
...
I had the same problem. The parameter did not print because there was no
data. Then I hid a field that should say either "initial", "pending" or
"closed" depending what the user put in the parameter box. Then I

referenced
to the box by creating a new text box, but it was still blank, because the
initial field that reads, for example, "initial", did not say that,

because
there was no data. Did I miss Duane's answer? The website does not seem to
give answers. What to do?

"Duane Hookom" wrote:

You won't need to. You can just access the control value.

However, if you want to access a parameter prompt value from a query,

the
query must return at least one record.

--
Duane Hookom
MS Access MVP
--

"jh" wrote in message
...
Thanks Duane. I will do that but I do have another question on this

issue.
Is
it possible to access the parameter value property of a query from

within
a
report which is bound to that query?


"Duane Hookom" wrote:

You can't get the parameter to display if there are no records. This

is a
good reason to use a reference to a control on a form rather than a
prompt.

Consider reviewing this page

http://www.fontstuff.com/access/acctut08.htm
on
using controls.

--
Duane Hookom
MS Access MVP
--

"jh" wrote in message
...
Hello,

I have a report that populates a field in the header from a report
parameter. This parameter field is a date which is used in the

query to
pick
up all records with a date prior to the entered parameter date. I

am
making
the controlsource property in the report field equal to the query
parameter
name.

If there are records that meet the query criteria the report field
properly
displays the parameter date entered by the user. The problem is

when
the
query doesn't return any records then the report field doesn't

display
the
value entered by the user as a parameter date but rather displays
#Error.

Thanks










  #8  
Old November 13th, 2004, 06:38 AM
Duane Hookom
external usenet poster
 
Posts: n/a
Default

Can you see the earlier postings in this thread that suggest getting all
criteria from controls on forms? You can always reference the form control
in your report.

--
Duane Hookom
MS Access MVP


"Soto" wrote in message
...
Is there absolutely no workaround to display the parameter on the report

if
there is no data? No programming?


"Duane Hookom" wrote:

You can reference the parameter value if the query returns records.

--
Duane Hookom
MS Access MVP


"Soto" wrote in message
...
I had the same problem. The parameter did not print because there was

no
data. Then I hid a field that should say either "initial", "pending"

or
"closed" depending what the user put in the parameter box. Then I

referenced
to the box by creating a new text box, but it was still blank, because

the
initial field that reads, for example, "initial", did not say that,

because
there was no data. Did I miss Duane's answer? The website does not

seem to
give answers. What to do?

"Duane Hookom" wrote:

You won't need to. You can just access the control value.

However, if you want to access a parameter prompt value from a

query,
the
query must return at least one record.

--
Duane Hookom
MS Access MVP
--

"jh" wrote in message
...
Thanks Duane. I will do that but I do have another question on

this
issue.
Is
it possible to access the parameter value property of a query from

within
a
report which is bound to that query?


"Duane Hookom" wrote:

You can't get the parameter to display if there are no records.

This
is a
good reason to use a reference to a control on a form rather than

a
prompt.

Consider reviewing this page

http://www.fontstuff.com/access/acctut08.htm
on
using controls.

--
Duane Hookom
MS Access MVP
--

"jh" wrote in message
...
Hello,

I have a report that populates a field in the header from a

report
parameter. This parameter field is a date which is used in the

query to
pick
up all records with a date prior to the entered parameter date.

I
am
making
the controlsource property in the report field equal to the

query
parameter
name.

If there are records that meet the query criteria the report

field
properly
displays the parameter date entered by the user. The problem is

when
the
query doesn't return any records then the report field doesn't

display
the
value entered by the user as a parameter date but rather

displays
#Error.

Thanks












 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Union Query Not Returning A Value Jeff G Running & Setting Up Queries 2 October 19th, 2004 05:47 PM
query a number stored as text Lee Running & Setting Up Queries 19 October 13th, 2004 04:10 AM
Personal input field in a report from a query. Louise Setting Up & Running Reports 2 October 7th, 2004 10:10 PM
Newbie? Do I use Report or Query John Egan New Users 11 June 28th, 2004 08:31 PM


All times are GMT +1. The time now is 12:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.