If you use a little VBA, it is quite simple to open a form to the
_selected record_ in a currently open Form. You simply use whatever field
uniquely identifies the record, and use the value to construct a
WhereCondition argument for the DoCmd.OpenForm. The wizard creates a
variable of a different name, stCriteria. Check Help for the OpenForm
method of DoCmd for assistance with the WhereCondition.
If you'd prefer, you can go to more work to set up the WhereCondition for
the most recent that applies to some particular id... using multiple
conditions/criteria.
Larry Linson
Microsoft Access
John said:
Sorry Jeff,
I am trying to sort this in a query as well.
My report is sourced from a query called qryPolicePurchasesFromCustomers
the report is based on cars and there owner(s), hence the history.
When i run the report I get multiple reports based on the car
registration number.
However I only want to print the most current one. This is to be
filtered on the most recent transaction number generated from a form
AutoID field and the field is called [TNum]
Regards
John
Jeff Boyce said:
John
We're not there. We have no idea 'how' you might be running your
report,
nor the table (or query on which it is based), nor your data structure,
...
I'm not sure what you mean by "history of an item" (see above).
How are you determining "current record"? Does this mean you are
working in
a form and wish to only see the report for the record visible in the
form?
(If you are working directly in a table or query, this won't work ...
you'll
need to be in a form to get a report to run on the "current record").
--
More info, please ...
Jeff Boyce
<Office/Access MVP>
Hi,
When I run my report I am presented, as expected, with a history of an
item.
How can I print the current record shown instead of all records?
Regards
John