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