Access Report Table

A

Anthony

If I have alot of tables that there is a table for every month and when I run
a report how can I have the report at the beginning ask me what month I want
to print? If you could please reply with any help. Thanks
 
J

John W. Vinson

If I have alot of tables that there is a table for every month and when I run
a report how can I have the report at the beginning ask me what month I want
to print? If you could please reply with any help. Thanks

Your database structure IS WRONG.

You should not have multiple identically structured tables, and you should not
store data in table names. Instead, you should have *one* table with all of
the data, with an additional field (date/time, or two fields with the year and
the month). You can then base the report on a query selecting the records for
the desired month.

John W. Vinson [MVP]
 
A

Anthony

How do I get it when I go to run the report the query pops up and asks me to
enter the month, I have people that can't use access and I'm trying to make
it as simple as I can, thanks.
 
F

fredg

How do I get it when I go to run the report the query pops up and asks me to
enter the month, I have people that can't use access and I'm trying to make
it as simple as I can, thanks.

You make it simple for them by doing it correctly in the first place.
All you need is one table to store the data in, with a date field.

Then it's a simple matter to query the user to enter the wanted month
(and year).

In a query that will be used as the report's record source, add a new
column:
ForWhen:Format(DateField],"mm/yyyy")
Then as criteria on this column, write:
[Enter month/year wanted as mm/yyyy]
 
V

Van T. Dinh

***Have all records in one Table***, not in multiple Tables of similar
structure, as per John advised the you can use a Parameter Query which will
pop up a dialog that ask the user for the criterion value, e.g. Month/Year.

Alternatively, you can create a [frmPreProcessor] which has TextBoxes /
ComboBoxes for the user to select monthd or date range and then a
CommandButton to run the Report using the value(s) entered by the user on
this Form to select the records for the Report.
 
J

John W. Vinson

How do I get it when I go to run the report the query pops up and asks me to
enter the month, I have people that can't use access and I'm trying to make
it as simple as I can, thanks.

You can make it even simpler than that.

Add a small unbound Form to your table, frmCrit let's call it, with two Combo
Boxes cboYear and cboMonth. cboYear would have as a rowsource a list of all
the years relevant to your application; cboMonth a list of numbers 1 to 12
(with the month names as a second field if you wish).

The Query upon which the report is based would use

=Forms!frmCrit!cboYear
and
=Forms!frmCrit!cboMonth

as criteria on the year and month fields respectively.

You could put a button on frmCrit to print the report, and use Tools...
Startup to make frmCrit the startup form in your database. The user opens the
database; selects a year (it can easily be set to default to the current
year), selects a month, clicks a button and picks up the printout. Can't get
much simpler than that!

John W. Vinson [MVP]
 
Top