Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / November 2004

Tip: Looking for answers? Try searching our database.

Populate report header field from query parameter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jh - 20 Oct 2004 16:13 GMT
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
Duane Hookom - 20 Oct 2004 16:25 GMT
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.

Signature

Duane Hookom
MS Access MVP
--

> Hello,
>
[quoted text clipped - 14 lines]
>
> Thanks
jh - 20 Oct 2004 18:55 GMT
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?

> 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.
[quoted text clipped - 20 lines]
> >
> > Thanks
Duane Hookom - 20 Oct 2004 19:14 GMT
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.

Signature

Duane Hookom
MS Access MVP
--

> Thanks Duane. I will do that but I do have another question on this issue.
> Is
[quoted text clipped - 31 lines]
>> >
>> > Thanks
Soto - 10 Nov 2004 21:09 GMT
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?

> You won't need to. You can just access the control value.
>
[quoted text clipped - 36 lines]
> >> >
> >> > Thanks
Duane Hookom - 12 Nov 2004 06:09 GMT
You can reference the parameter value if the query returns records.

Signature

Duane Hookom
MS Access MVP

> 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
[quoted text clipped - 44 lines]
> > >> >
> > >> > Thanks
Soto - 13 Nov 2004 05:19 GMT
Is there absolutely no workaround to display the parameter on the report if
there is no data? No programming?

> You can reference the parameter value if the query returns records.
>
[quoted text clipped - 57 lines]
> > > >> >
> > > >> > Thanks
Duane Hookom - 13 Nov 2004 06:38 GMT
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.

Signature

Duane Hookom
MS Access MVP

> Is there absolutely no workaround to display the parameter on the report if
> there is no data? No programming?
[quoted text clipped - 60 lines]
> > > > >> >
> > > > >> > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.