print queue list box

L

ljg08

Hi Guys,

I have a form that has a list box showing invoices I want to print. the form
has 2 buttons , 'print all' and 'print selected' to allow user to print all
listed invoices or just a selected invoice, whilts this has been easy to
create I do not know how to code for the print fuction, can anyone advise
please?

TIA
 
B

bhicks11 via AccessMonster.com

Hi Tia,

In VBA:

DoCmd.OpenReport "Sales Report", acViewNormal, "Report Filter"
(go down the list of your reports to print all - select print or view)

Or - use a macro and put a line for each report: OpenReport

Bonnie

http://www.dataplus-svc.com
 
L

ljg08

Hi Bonnie,

Many thanks for that, however, can you expand on your answer please. For
"Report Filer" what does this refer to?

What I have currently is:

Private Sub CmdPrint_Click()
Select Case Me.potPrint
Case 1
DoCmd.OpenReport "rptInvoice", acViewPreview
Case 2
DoCmd.OpenReport "rptInvoice", acViewNormal
End Select
End Sub

The optList also has a feild 'print' which is set to 'true', and also want
to set this to 'false' if the print run is successful, so assume I need to
put a message box in thier and if users selects ok, then the print is set to
'false' else it stays 'true'

Any suggestions would be appreciated.

Regards
Les


Also I have an option box for print preview or print, to allow the users to
view before printing
 
B

bhicks11 via AccessMonster.com

Hi Tia,

That was just an example of the DoCmd.OpenReport and
FilterName = Optional Variant. A string expression that's the valid name of
a query in the current database. You don't have to use it.

Your Case Sub looks good - there's more than one way to skin a cat. How many
invoices are possible? If I understand what you are trying to do:

Case 1 (where they select print all)
DoCmd.OpenReport "rptInvoice1", acViewPreview
DoCmd.OpenReport "rptInvoice2", acViewPreview
DoCmd.OpenReport "rptInvoice3", acViewPreview
etc.
Case 2 (just selected one invoice)
DoCmd.OpenReport "whateverRptInvoiceSelect", acViewPreview (or
Print)

I would just assume they printed (the user will get an error that they have
to attend to anyway if the print doesn't complete). Add a line something
like, me.field = false.

Bonnie

http://www.dataplus-svc.com


Hi Bonnie,

Many thanks for that, however, can you expand on your answer please. For
"Report Filer" what does this refer to?

What I have currently is:

Private Sub CmdPrint_Click()
Select Case Me.potPrint
Case 1
DoCmd.OpenReport "rptInvoice", acViewPreview
Case 2
DoCmd.OpenReport "rptInvoice", acViewNormal
End Select
End Sub

The optList also has a feild 'print' which is set to 'true', and also want
to set this to 'false' if the print run is successful, so assume I need to
put a message box in thier and if users selects ok, then the print is set to
'false' else it stays 'true'

Any suggestions would be appreciated.

Regards
Les

Also I have an option box for print preview or print, to allow the users to
view before printing
[quoted text clipped - 20 lines]
 
L

ljg

They could have anything from 0 > 30+, they can print invoices as they raise
them, however, as customers can call back and add items to an order before
it's despatched, they want to have the option to hold in a queue until ready
to print just prior to dispatch.

So want to print invoices 1,2,3,4 etc individually. My List box has values
for:

Invoice, Date, Company, User, £value, To Print

So I want it to use Invoice as the criteria to print, all if nothing is
selected or just the one invoice if one is selected?






bhicks11 via AccessMonster.com said:
Hi Tia,

That was just an example of the DoCmd.OpenReport and
FilterName = Optional Variant. A string expression that's the valid name
of
a query in the current database. You don't have to use it.

Your Case Sub looks good - there's more than one way to skin a cat. How
many
invoices are possible? If I understand what you are trying to do:

Case 1 (where they select print all)
DoCmd.OpenReport "rptInvoice1", acViewPreview
DoCmd.OpenReport "rptInvoice2", acViewPreview
DoCmd.OpenReport "rptInvoice3", acViewPreview
etc.
Case 2 (just selected one invoice)
DoCmd.OpenReport "whateverRptInvoiceSelect", acViewPreview (or
Print)

I would just assume they printed (the user will get an error that they
have
to attend to anyway if the print doesn't complete). Add a line something
like, me.field = false.

Bonnie

http://www.dataplus-svc.com


Hi Bonnie,

Many thanks for that, however, can you expand on your answer please. For
"Report Filer" what does this refer to?

What I have currently is:

Private Sub CmdPrint_Click()
Select Case Me.potPrint
Case 1
DoCmd.OpenReport "rptInvoice", acViewPreview
Case 2
DoCmd.OpenReport "rptInvoice", acViewNormal
End Select
End Sub

The optList also has a feild 'print' which is set to 'true', and also want
to set this to 'false' if the print run is successful, so assume I need to
put a message box in thier and if users selects ok, then the print is set
to
'false' else it stays 'true'

Any suggestions would be appreciated.

Regards
Les

Also I have an option box for print preview or print, to allow the users
to
view before printing
[quoted text clipped - 20 lines]
 
B

bhicks11 via AccessMonster.com

Sorry, I didn't understand the variable number of reports but I found this
link that I think will help:

http://www.fabalou.com/Access/Forms/printing_reports.asp

Love to know if it works for you.

Bonnie

http://www.dataplus-svc.com
They could have anything from 0 > 30+, they can print invoices as they raise
them, however, as customers can call back and add items to an order before
it's despatched, they want to have the option to hold in a queue until ready
to print just prior to dispatch.

So want to print invoices 1,2,3,4 etc individually. My List box has values
for:

Invoice, Date, Company, User, £value, To Print

So I want it to use Invoice as the criteria to print, all if nothing is
selected or just the one invoice if one is selected?
[quoted text clipped - 60 lines]
 
L

ljg

Hi Bonnie,

Not sure if this is the answer, will take a look and see if I can get it to
work, that method lists all various reports in the db, while what I want is
the one report, 'invoice' then all values for each invoice produced.

Will post back if I get an answer for you.

Many thanks for your time with this

Les

bhicks11 via AccessMonster.com said:
Sorry, I didn't understand the variable number of reports but I found this
link that I think will help:

http://www.fabalou.com/Access/Forms/printing_reports.asp

Love to know if it works for you.

Bonnie

http://www.dataplus-svc.com
They could have anything from 0 > 30+, they can print invoices as they
raise
them, however, as customers can call back and add items to an order before
it's despatched, they want to have the option to hold in a queue until
ready
to print just prior to dispatch.

So want to print invoices 1,2,3,4 etc individually. My List box has values
for:

Invoice, Date, Company, User, £value, To Print

So I want it to use Invoice as the criteria to print, all if nothing is
selected or just the one invoice if one is selected?
[quoted text clipped - 60 lines]
 

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

Top