Displaying Forms

  • 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.

I received the following answer back:-

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

I thought I would be able to figure out where the code needs inserting but
to no avail. Can anyone help

Cheers

Steve
 
Put that code (with your specific form and variable names) in the click
event of a button.
 
Many Thanks Arvin

Arvin Meyer said:
Put that code (with your specific form and variable names) in the click
event of a button.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Steve Moss 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.

I received the following answer back:-

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

I thought I would be able to figure out where the code needs inserting but
to no avail. Can anyone help

Cheers

Steve
 
Tired the code, it doesnt preview, it only prints the document.

Steve Moss said:
Many Thanks Arvin

Arvin Meyer said:
Put that code (with your specific form and variable names) in the click
event of a button.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Steve Moss 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.

I received the following answer back:-

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

I thought I would be able to figure out where the code needs inserting but
to no avail. Can anyone help

Cheers

Steve
 
Change

DoCmd.OpenReport "Name of Report", , , "[InvoiceID] = " & Me!InvoiceID

to

DoCmd.OpenReport "Name of Report", acViewPreview , , "[InvoiceID] = " &
Me!InvoiceID


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Steve Moss said:
Tired the code, it doesnt preview, it only prints the document.

Steve Moss said:
Many Thanks Arvin

Arvin Meyer said:
Put that code (with your specific form and variable names) in the click
event of a button.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

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.

I received the following answer back:-

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

I thought I would be able to figure out where the code needs
inserting but
to no avail. Can anyone help

Cheers

Steve
 
Back
Top