Access Reports

  • Thread starter Thread starter Guest
  • Start date Start date
Cassess said:
How do I select one row from the database to view a Report and print.

Two ways:

(1) Use the WhereCondition or Filter arguments of the DoCmd.OpenReport, or

(2) Use VBA code to construct a complete SQL statement, including criteria
to select the single record, and, in the Open event of the report, pick it
up and use it to replace the RecordSource of the report, or

(3) include the criteria in a Query that you use for the RecordSource of the
Report, as a Parameter, and type in the identification when prompted.

I prefer either (1) or (2), implemented with a Form so that the choice of
the particular individual can be made from a ComboBox or ListBox, rather
than having to type it in correctly.

Larry Linson
Microsoft Access MVP


The second is somewhat more efficient. It will only be apparent if there are
a great many records involved.

Larry Linson
Microsoft Access MVP
 
Good grief the answer seems hard...an SQL statement?

There must be some way you are selecting the one row, either with an entry
from the user,
or the result of a query.

Use the Query as the basis for your report (use the wizard), or use the
following trick:
build a form that displays the record(s) in just the way you want, then open
a blank report,
click on the form name and 'drag and drop' the form into the report.

Scott
 
Back
Top