printing a form

  • Thread starter Thread starter PC Datasheet
  • Start date Start date
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
 
Hi everybody,

I have a Form VIEWing a Table (1 rec. at a time) and want to print the
current record not as a Form but as a Report (without key-in any info e.g
[Enter Rec N]) & .
Does anybody have any notion how to code it?
(I use Access 2k)

Thanks in advance,

David
 
Back
Top