Printing

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

Hello

I have a customer form with a subform containing orders,
and I have a button that runs a macro that simply opens,
prints and closes a form which give me info on that
customers order.

My problem is that it wants to print a form/page for each
order, rather than just the current order that is showing
on screen.

This is the condition currently in my macro.

[Customer ID]=[Forms]![Contacts Master PRO]![ContactID]

Please keep it simple! I am new to this!

Many thanks - Gary
 
Gary,

Entering this as the macro Condition would not be the best way to do
this. In any case you need to refer to the Order, presumably with an
OrderID or some such, rather than to the CustomerID, for whom there can
be more than one order.

Having said this, I would also recommend you make a report to print out
your order information. Whereas it is theoretically possible to print a
form, this is not really the purpose of forms, and so the management of
such is comparatively awkward. Here's the way I would do it... Make a
Query that includes both your Customer and Order tables, put the fields
you want to see in your printout into the query design grid, and also
the OrderID field, and in the criteria of the OrderID column, put the
equivalent of...
[Forms]![Contacts Master PRO]![NameOfYourSubform]![OrderID]
Then, make a report based on this query. And change the macro on your
command button which uses the OpenReport action to print the report.

Please post back if you need any more specific help with any of this.
 
Thank you Steve - this works great!
-----Original Message-----
Gary,

Entering this as the macro Condition would not be the best way to do
this. In any case you need to refer to the Order, presumably with an
OrderID or some such, rather than to the CustomerID, for whom there can
be more than one order.

Having said this, I would also recommend you make a report to print out
your order information. Whereas it is theoretically possible to print a
form, this is not really the purpose of forms, and so the management of
such is comparatively awkward. Here's the way I would do it... Make a
Query that includes both your Customer and Order tables, put the fields
you want to see in your printout into the query design grid, and also
the OrderID field, and in the criteria of the OrderID column, put the
equivalent of...
[Forms]![Contacts Master PRO]![NameOfYourSubform]! [OrderID]
Then, make a report based on this query. And change the macro on your
command button which uses the OpenReport action to print the report.

Please post back if you need any more specific help with any of this.

--
Steve Schapel, Microsoft Access MVP

Hello

I have a customer form with a subform containing orders,
and I have a button that runs a macro that simply opens,
prints and closes a form which give me info on that
customers order.

My problem is that it wants to print a form/page for each
order, rather than just the current order that is showing
on screen.

This is the condition currently in my macro.

[Customer ID]=[Forms]![Contacts Master PRO]![ContactID]

Please keep it simple! I am new to this!

Many thanks - Gary
.
 
Back
Top