Priniting Reports

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

Guest

I have a main for, with a subform attached. The combination of the two, when
populated creates an Invoice report. Unfortunatly when I view the Report, it
includes all the invoice Reports page after page. How can I limit what I am
looking at to only the active Invoice displayed on my form. Hope that makes
sense.

Cheers

Steve
 
If Me.Dirty Then
Me.Dirty = False
End If
DoCmd.OpenReport "Name of Report", , , "[InvoiceID] = " & Me!InvoiceID
 
Many thanks, I will try it tonight.

Joan Wild said:
If Me.Dirty Then
Me.Dirty = False
End If
DoCmd.OpenReport "Name of Report", , , "[InvoiceID] = " & Me!InvoiceID

--
Joan Wild
Microsoft Access MVP

Steve said:
I have a main for, with a subform attached. The combination of the
two, when populated creates an Invoice report. Unfortunatly when I
view the Report, it includes all the invoice Reports page after page.
How can I limit what I am looking at to only the active Invoice
displayed on my form. Hope that makes sense.

Cheers

Steve
 
Thinking I was clever I tried to use the code you provided Joan. It soon
came apparant that I was actually not as clever as I hoped. Could you please
tell me where to insert the code.
Many Thanks

Steve (The not so clever)

Joan Wild said:
If Me.Dirty Then
Me.Dirty = False
End If
DoCmd.OpenReport "Name of Report", , , "[InvoiceID] = " & Me!InvoiceID

--
Joan Wild
Microsoft Access MVP

Steve said:
I have a main for, with a subform attached. The combination of the
two, when populated creates an Invoice report. Unfortunatly when I
view the Report, it includes all the invoice Reports page after page.
How can I limit what I am looking at to only the active Invoice
displayed on my form. Hope that makes sense.

Cheers

Steve
 
You'd put that wherever you're trying to open the report, be it on the Click
event of a command button, or some other event.

All the first 3 lines are doing is ensuring that the record is saved if
there are still pending changes to it. The 4th line simply passes a filter
to the report when it's opening it. (You do realize, I hope, that you need
to change "Name of Report",[InvoiceID] and Me!InvoiceID to whatever names
are appropriate in your case)

If you've done all that and it's not working, show us the actual code you're
using, and let us know what the symptoms are. Are you getting an error? If
so, what's the error. Is the report opening, but not being filtered?


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Steve Moss said:
Thinking I was clever I tried to use the code you provided Joan. It soon
came apparant that I was actually not as clever as I hoped. Could you
please
tell me where to insert the code.
Many Thanks

Steve (The not so clever)

Joan Wild said:
If Me.Dirty Then
Me.Dirty = False
End If
DoCmd.OpenReport "Name of Report", , , "[InvoiceID] = " & Me!InvoiceID

--
Joan Wild
Microsoft Access MVP

Steve said:
I have a main for, with a subform attached. The combination of the
two, when populated creates an Invoice report. Unfortunatly when I
view the Report, it includes all the invoice Reports page after page.
How can I limit what I am looking at to only the active Invoice
displayed on my form. Hope that makes sense.

Cheers

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top