P
PC Datasheet
Make sure you have the primary key from your table on the form but hidden (not
visible). Create a query that contains the primary key from your table and then
all the fields you want in the report. Set the criteria of the primary key field
to: Forms!NameOfYourForm!NameOfYourPrimaryKey. Create a report based on the
query. Put a button on your form with this code in the OnClick event:
DoCmd.OpenReport "NameOfYourReport" acPreview
When you click the button, your report should open on the screen in preview mode
and contain the data for the record in the form.
--
PC Datasheet
A Resource for Access, Excel and Word Applications
(e-mail address removed)
www.pcdatasheet.com
· Design and basic development for new applications
· Additions, Modifications and "Fixes" for existing applications
· Mentoring for do-it-yourselfers who want guidance
· Complete application design and development
· Applications Using Palm Pilot To Collect Data And
Synchronize The Data Back To Access Or Excel
visible). Create a query that contains the primary key from your table and then
all the fields you want in the report. Set the criteria of the primary key field
to: Forms!NameOfYourForm!NameOfYourPrimaryKey. Create a report based on the
query. Put a button on your form with this code in the OnClick event:
DoCmd.OpenReport "NameOfYourReport" acPreview
When you click the button, your report should open on the screen in preview mode
and contain the data for the record in the form.
--
PC Datasheet
A Resource for Access, Excel and Word Applications
(e-mail address removed)
www.pcdatasheet.com
· Design and basic development for new applications
· Additions, Modifications and "Fixes" for existing applications
· Mentoring for do-it-yourselfers who want guidance
· Complete application design and development
· Applications Using Palm Pilot To Collect Data And
Synchronize The Data Back To Access Or Excel