Access specific record on report headers

  • Thread starter Thread starter Mario
  • Start date Start date
M

Mario

I have an Access report with 1 field displayed in the
report header section. When I view the report, the value
which appears in the field in the report header section is
always the value in the first record displayed on the
report. Is it possible to display instead the value for
that field for a specific record? The specific record
would be selected from a query parameter using a where
clause.

Thanks
 
I have an Access report with 1 field displayed in the
report header section. When I view the report, the value
which appears in the field in the report header section is
always the value in the first record displayed on the
report. Is it possible to display instead the value for
that field for a specific record? The specific record
would be selected from a query parameter using a where
clause.

Thanks

Hi Mario,

Because you are using a control bound to a field in your table, Access
is just showing the first one. That is by design, and AFAIK there's no
way to select a different record.

You could use a DLookup for that control instead. Then you can specify
which record to lookup.
 
If you wanted a specific ProductName from the Products table of
Northwind.mdb corresponding to a user entering a specific ProductID you
could use a record source for your report like:

SELECT Products.*, (SELECT ProductName FROM Products WHERE ProductID =
[Enter Product ID]) As SelectedProd
FROM Products;

Then just bind a text box to [SelectedProd]. It will be the one
corresponding to the value entered by the user.
 
Back
Top