Print Preview in duplicate!

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

Guest

Hi there.. Thanks in advance

I'm building a form. I have the form header and some fields in the body of
the form. All of a sudden, when I check the print preview, I'm seeing the
body of the form in duplicate... one beneath the other... separated by a line.

Oh, it also prints out that way...

Help!
 
sounds like there is more than one record in the table or query that's being
used as the form's RecordSource, and the form's DefaultView property is set
to ContinuousForms.

hth
 
Tina..Thanks for your response.

I'm not sure what the first part means or what to do about it, but I found
the DefaultView Property for the whole form, and it's set to "Single Form"

Could you explain the first part a bit more.. I'm new to Access. Thanks!
 
okay, on re-reading your first post, i see that you're clicking on
PrintPreview. why? FormView and PrintPreview are two different views, and
PrintPreview is essentially useless when you're working with a form; if you
need to print a record from a form, you should create a report and print the
report. forms are for data entry and display, not printing.

hth
 
Tina..OK. The form I'm designing is like a "profile" on one person..some
demographics at the top and some information about how they responded to
certain questions in the body of the form...

If someone wanted to print out this complete "profile" on one person - could
they not just click print from the form view?

Can one create a "report" that just prints one profile?
 
Can one create a "report" that just prints one profile?

yes. create a report based on the same table or query that the form is based
on. put a command button on the form, with a macro or code to 1) save the
current record, and 2) open the report, with a WHERE clause that limits the
report's recordset to the current record on the form, as

If Me.Dirty Then Me.Dirty = False
DoCmd.OpenReport "ReportName", , , "PrimaryKeyField = " _
& Me!PrimaryKeyField

substitute the correct report name, of course, and the correct name of the
primary key field in the table which underlies both the form and the report.
if the form and report are bound to a query, make sure the primary key field
is included in the query's output (the fields you see when you open the
query up by itself).

hth
 
Wow! Thanks Tina!

tina said:
yes. create a report based on the same table or query that the form is based
on. put a command button on the form, with a macro or code to 1) save the
current record, and 2) open the report, with a WHERE clause that limits the
report's recordset to the current record on the form, as

If Me.Dirty Then Me.Dirty = False
DoCmd.OpenReport "ReportName", , , "PrimaryKeyField = " _
& Me!PrimaryKeyField

substitute the correct report name, of course, and the correct name of the
primary key field in the table which underlies both the form and the report.
if the form and report are bound to a query, make sure the primary key field
is included in the query's output (the fields you see when you open the
query up by itself).

hth
 
Tina - Thanks in advance for further help on this!!

I'm at the point of creating this button..

My report is called "Report1" and the Primary key field is "ID" and I've
named the button "PRINTBUTTON." The record source for both form and table is
the same table.

The code below what I've inserted in the "on click" event procedure," but I
get an error message. What am I doing wrong?

Private Sub PRINTBUTTON_Click()
If Me.Dirty Then Me.Dirty = False
DoCmd.OpenReport "Report1", , , "ID = " _
& Me!ID
End Sub
 
Back
Top