Command button to Print/View Customer

  • Thread starter Thread starter teelee
  • Start date Start date
T

teelee

I have a form named Orders by Customer that has a subform with all the
customer's orders and I want to add a command button on the bottom so that
when an individual customer is showing along with all their information I can
print/view that info for that customer showing. Is there a way I can do this?


Thanks in Advance
 
I already have a report with customers orders and added the command button,
but when I click on it I get all the customers showing on the report. I only
need the customer that is showing in the subform.

Thanks
 
Ok this is what I have: Private Sub Preview_Report_Click()
DoCmd.OpenReport "Rpt Customer"
acViewPreview , , "CustomerID=" & Text0, acWindowNormal

End Sub
and this is the error message I'm getting: Compile error
Invalid use of Property
Any Suggestions of what I'm doing wrong?

Thanks

DoCmd.OpenReport "Rpt Customer"
acViewPreview , , "CustomerID=" & Text0, acWindowNormal

End Sub
 
Ok this is what I have: Private Sub Preview_Report_Click()
DoCmd.OpenReport "Rpt Customer"
acViewPreview , , "CustomerID=" & Text0, acWindowNormal

End Sub
and this is the error message I'm getting: Compile error
Invalid use of Property
Any Suggestions of what I'm doing wrong?

Thanks

DoCmd.OpenReport "Rpt Customer"
acViewPreview , , "CustomerID=" & Text0, acWindowNormal

If you have a textbox named Text0 on the form, change Text0 in the above to

Me!Text0

That's a default name for a control, but it's a really bad name from a
usability and documentation standpoint; consider renaming the control and
using the new name in the Me! expression.
 
Back
Top