printing invoices

J

Jeff

Thanks for taking a look at this problem.

I have table with students details, especially the payment
details-tblStudents
I have a table with the number of payments- tblPayments

I have a querytable made from these tables (without a relationship) to print
the number of invoices for each client depending on the number of months
they pay the cost of the course.

The problem is that details of the query are sent to the invoice (report)
for printing. I have to print all of them in one go. It's ok, but sometimes
a student makes changes and I need to print out a new invoice. I can print
out only the number of the pages related to that student, which is ok, but
I'd like a better solution if possible.

I'd like to print the invoice directly from the visualisation form using a
button. So that only that student's invoices will be printed without having
to look through the pages of the invoice report and alter the printer
settings.

Is it possible?

Thanks for any advice

Jeff.
 
D

Denny G.

Jeff, why don't you do what I did. I went to the sample
NorthWinds Trader Database that comes with Access. The
DB should be on your computer. Go into the NorthWinds DB
and take a look at the "ORDERS" form. Notice the "Print
Invoice" button at the bottom of the form. I have used
this same technique except I open the invoice in preview
and then print it from there. This way you can print
just one invoice while in you main form for the specific
student/transaction. You can also go to Reports in the
NW DB and look at the Invoice report. I hope this is
what you are looking for.

Denny G.
 
F

Fons Ponsioen

Jeff I see you already have an answer.

The easiest approach I think is:
Add a Command Button to your Form. Code it's Click event:
DoCmd.OpenReport "YourReportName",acViewPreview, , "[Record
ID] = " & [RecordID]
The above assumes your table has a unique prime key field
named [RecordID] and it is of Number Datatype.
Change [RecordID] to whatever the actual name of that
field is.
Hope this helps.
Take care.
Fons
 

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