MS Access Reporting

L

lorenadams

Hi, I am working with MS Access 2003 and I have a parameter query
that request beginning and ending dates. I would like to place those
date entered by the user on a report. Would someone please tell me
how I can do this. The dialog boxes that request the date information
don't have names that I can refer to. Thanks in advance for the help.

Loren
 
P

pietlinden

Hi, I am working with MS Access 2003 and I have a parameter query
that request beginning and ending dates. I would like to place those
date entered by the user on a report. Would someone please tell me
how I can do this. The dialog boxes that request the date information
don't have names that I can refer to. Thanks in advance for the help.

Loren

Hands down the easiest way is to have the user enter the dates into an
unbound form, and then you can put a button on the form that opens the
report. And then in the report, you can set the rowsource for the
control to point at the form...

=Forms![Name of My Form]![Name of StartDate Control]
for example... here's one I just did...
I have an UNBOUND textbox control on my report with the following
control source

=Forms!Form1!txtShowMeOnReport

Form1 is the name of the form. (If you have spaces in your report name
or control name, you'll have to surround it with square brackets)

=Forms![Form 1]![txtShowMeOnReport]

the only other trick is that "Form 1" or whatever form contains the
textbox you want to show in your report must be open when you open the
report. The easiest way to do it is to open your form in normal mode,
then open your report in design mode. Then you can just use the
textbox wizard, and select the forms folder, choose your open form,
and then select the control on your form, and the wizard does the
rest... (or you could just type in the controlsource...)

HTH
 
L

Larry Daugherty

If you used Access's "parameter query" methodology then the parameter
requests are coming from the parameters. I suggest that you change
the query to a regular "select" query. You'll probably still have to
kill the parameters or the prompts will keep coming at you.

On the criteria line for the beginning date put something like

Like [Enter beginning date]

do the same kind of thing for the ending date.

That will give you two prompts similar to those you get now.

A kinder thing for your users would be to create a "launcher" form.
That way they can enter both values without being hassled with
prompts. On your launcher place two unbound textboxes. Name and
label them appropriately With the wizards enabled, create a command
button to open the target report.

Open the report in design mode, get at the data and click the ellipsis
(...) to open the underlying query. Replace the criteria statements
that you created above with new criteria statements like:

Like [forms!frmMyLauncher!txtBeginDate]

When everything is done correctly, entering viable dates in the
textboxes and clicking your command button on your launcher form will
cause the report to either be opened for preview or print depending on
the command arguments behind the command button. I'd label that
command button something like:

&Print MyReport

HTH
 
L

lorenadams

If you used Access's "parameter query" methodology then the parameter
requests are coming from the parameters. I suggest that you change
the query to a regular "select" query. You'll probably still have to
kill the parameters or the prompts will keep coming at you.

On the criteria line for the beginning date put something like

Like [Enter beginning date]

do the same kind of thing for the ending date.

That will give you two prompts similar to those you get now.

A kinder thing for your users would be to create a "launcher" form.
That way they can enter both values without being hassled with
prompts. On your launcher place two unbound textboxes. Name and
label them appropriately With the wizards enabled, create a command
button to open the target report.

Open the report in design mode, get at the data and click the ellipsis
(...) to open the underlying query. Replace the criteria statements
that you created above with new criteria statements like:

Like [forms!frmMyLauncher!txtBeginDate]

When everything is done correctly, entering viable dates in the
textboxes and clicking your command button on your launcher form will
cause the report to either be opened for preview or print depending on
the command arguments behind the command button. I'd label that
command button something like:

&Print MyReport

HTH
Thank you very much! Your suggestions make good sense to me. I am
coming from another programming environment and am not sure how to do
many things in Access. I appreciate this forum and those who
participate in it.

Loren
 
L

Larry Daugherty

Thanks for those kind words. Welcome to Access development.

Your skills as a programmer will transfer to any programming
environment. The frustrating thing is not knowing how do in your new
platform what you did with ease in the old one. Be patient with
yourself. Access has a fairly long and step learning curve. It's
worth the trip.

There are several things you can do to speed the process. They all
take time and effort on your part.

1. Keep lurking the Access newsgroups. There are a bunch of them.
For people just learning or transitioning from another platform I
always recommend lurking

microsoft.public.access.gettingstarted and
microsoft.public.access.tablesdesign

2. I recommend making trips to some of the larger book stores such as
Barnes & Noble and Borders that have large and well stocked computer
sections. Find books that speak to you and that continue beyond what
you already know. I partially recommend the Access [YourVersion]
Developer's Handbook by Ken Getz et alia. Any edition will help. The
last edition they wrote was Access 2002. You just need the Desktop
Volume (1). There are lots of other good authors and good books on
Access.

3. www.mvps.org/access is a terrific resource. I suggest that you
visit it and poke around.

HTH
--
-Larry-
--

If you used Access's "parameter query" methodology then the parameter
requests are coming from the parameters. I suggest that you change
the query to a regular "select" query. You'll probably still have to
kill the parameters or the prompts will keep coming at you.

On the criteria line for the beginning date put something like

Like [Enter beginning date]

do the same kind of thing for the ending date.

That will give you two prompts similar to those you get now.

A kinder thing for your users would be to create a "launcher" form.
That way they can enter both values without being hassled with
prompts. On your launcher place two unbound textboxes. Name and
label them appropriately With the wizards enabled, create a command
button to open the target report.

Open the report in design mode, get at the data and click the ellipsis
(...) to open the underlying query. Replace the criteria statements
that you created above with new criteria statements like:

Like [forms!frmMyLauncher!txtBeginDate]

When everything is done correctly, entering viable dates in the
textboxes and clicking your command button on your launcher form will
cause the report to either be opened for preview or print depending on
the command arguments behind the command button. I'd label that
command button something like:

&Print MyReport

HTH
Thank you very much! Your suggestions make good sense to me. I am
coming from another programming environment and am not sure how to do
many things in Access. I appreciate this forum and those who
participate in it.

Loren
- Show quoted text -
 

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