Printing Report and Unwanted Form

  • Thread starter Thread starter Greg2582
  • Start date Start date
G

Greg2582

I may be posting this in the wrong place, so I'll apologize for that now.

This may be a simple question, but apparently I'm missing something.

I'm working with a simple database that ask the user to complete some basis
identification questions and then answer about 30 questions over several
different tabs on the same form and save the data. The user can retrieve the
info using by selecting a different form on the switchboard. My problem is if
the user wants to print the information out in a report. I've designed a
report to get the information, but when it printed from the form, it also
prints a copy of the form itself. The code is below:


Private Sub cmdPrint_Click()

Me.Refresh
DoCmd.OpenReport "rptChecklist", acViewNormal, ,
"[SBID]=[forms]![frmNewChecklist]![SBID]"
Me.Repaint

End Sub

If I remove the code after "acViewNormal", it prints a report for every item
in the database.
Any suggestions would be greatly appreciated.

Greg
 
Check to see if the form property "Lay-out" for print is set to no. This will
prevent it from being printed.

hth
 
The form property "Lay-out" is set to no. I thought "Lay-Out" is used for
choice the font?

Maurice said:
Check to see if the form property "Lay-out" for print is set to no. This will
prevent it from being printed.

hth
--
Maurice Ausum


Greg2582 said:
I may be posting this in the wrong place, so I'll apologize for that now.

This may be a simple question, but apparently I'm missing something.

I'm working with a simple database that ask the user to complete some basis
identification questions and then answer about 30 questions over several
different tabs on the same form and save the data. The user can retrieve the
info using by selecting a different form on the switchboard. My problem is if
the user wants to print the information out in a report. I've designed a
report to get the information, but when it printed from the form, it also
prints a copy of the form itself. The code is below:


Private Sub cmdPrint_Click()

Me.Refresh
DoCmd.OpenReport "rptChecklist", acViewNormal, ,
"[SBID]=[forms]![frmNewChecklist]![SBID]"
Me.Repaint

End Sub

If I remove the code after "acViewNormal", it prints a report for every item
in the database.
Any suggestions would be greatly appreciated.

Greg
 
Back
Top