Create Access report based on one record in a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to produce a report based on one record from the many in my
database. The database holds records of customers, andI need to print off
separate reports for each customer from time to time - but never all at one.
I'd like to create a list box, or combo box, from which I select the customer
whose record I'd like to print. When I scroll down through the list, and
click on the customer name, the report will open showing that customer's
details, and only that customer.

I realise I may have to create a query first of all, based on my table of
records, but don't know how to write the code to select the customer.
 
Annie:

The KB article listed below shows how to reference a form control in a
query. You can use the Click event of a list box or the Change event of a
combo box to trigger the opening of the report. You can use the
DoCmd.OpenReport method to open the report in either of these two events.
For example:

DoCmd.OpenReport "MyReportName", acViewPreview

http://support.microsoft.com/kb/304428/EN-US/

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I would like to produce a report based on one record from the many in my
database. The database holds records of customers, andI need to print off
separate reports for each customer from time to time - but never all at one.
I'd like to create a list box, or combo box, from which I select the
customer
whose record I'd like to print. When I scroll down through the list, and
click on the customer name, the report will open showing that customer's
details, and only that customer.

I realise I may have to create a query first of all, based on my table of
records, but don't know how to write the code to select the customer.
 
Back
Top