reports

  • Thread starter Thread starter jen
  • Start date Start date
J

jen

Hi, I am trying to create a report based on a form and
tables. Basically the report should display a regional
header and below that is a state header and within each
state will be a list of peoples names and addresses. So
for example Region 5 would represent the north eastern
states and then each state would be listed below that and
then below each state there would be a list of peoples'
information. I have managed to create this report through
a query where I can extract the information from the
tables that I want. However, I want to be able to enter
the regional number in a form and then have the report
produced based on what is entered in the form. Any help is
appreciated.

Thanks!
 
Jen,
What you're asking for is going to take a little
programming. I can't tell the level you're at but... I'll
try to explain the best way I can. You'll need to set up
a new Module and call it Global Functions (or something
like that). Declare the a Global called FormVariable.
When the person inputs the the information you'll have to
program the result to be passed to the global variable.
Then you should activate the report in the code by:

DoCmd.OpenReport "YourReportName", acViewNormal

In the report you'll have to use the FormVariable and open
your recordsource. This will show the information you're
needing. Like I said before... this is cut and dry, a
simple explanation to do it. You need to have some
programming experience to do this. Hope this was helpful.
 
Unless I am missing something, I think this is rather
simple.
You say you have a query selecting the data elements that
you want for your report.
Create your report grouping by Region, and a second
grouping by state, than a sort by name.
In your query under the region data element in the
criteria block type "[Enter Region]" without the quotes.
Now, when you run your report you will be prompted for the
region number and the states with repective names will be
listed in your report.
Hope this helps.
Have a Merry Christmas.
Fons
 
Back
Top