Mass Print Problem

jkfeagle

Codus Confusious
Local time
Today, 11:50
Joined
Aug 22, 2002
Messages
166
I have a continuous form that after selecting a group from a combo box, should give the user the option to print a report associated with the selected records. The user chooses which to print from the displayed records by simply checking on a yes/no checkbox for each record. The print button calls up and prints the report which is based on a different query but uses a control on the form (EmpID) to filter the list as well as whether the checkbox is set to true. The form is set to requery before it prints the report in order to make sure that all the checks are recorded to the table under the form. The problem I have is that when the first record is checked it will print. When any other records are checked, for some reason it doesn't see those records. I suspect the problem is associated with the field that uniquely identifies each record (EmpID) and that somehow the query is only seeing the first record in the dataset displayed on the form. Anyone have any ideas?
 
I have a continuous form that after selecting a group from a combo box, should give the user the option to print a report associated with the selected records. The user chooses which to print from the displayed records by simply checking on a yes/no checkbox for each record. The print button calls up and prints the report which is based on a different query but uses a control on the form (EmpID) to filter the list as well as whether the checkbox is set to true. The form is set to requery before it prints the report in order to make sure that all the checks are recorded to the table under the form. The problem I have is that when the first record is checked it will print. When any other records are checked, for some reason it doesn't see those records. I suspect the problem is associated with the field that uniquely identifies each record (EmpID) and that somehow the query is only seeing the first record in the dataset displayed on the form. Anyone have any ideas?

Where is the value for the check box getting stored? Is it bound to a field in a table?
 
Yes it is. The data is going through a query to a table. That's why I'm doing a requery to make sure it took before opening the report that pulls from the other query.
 
You do not need to require the data, you just need to save the current record.

Here is a little example of what I call Batch printing that does basically what you want.
 

Attachments

Boyd,

Thanks for your help. The problem, just as I thought, was with using the EmpID field as a filter in the query. Without it it works fine. My only hesistation with this and the reason I didn't go this route in the first place is that there are many front ends and if two people are doing a mass print simultaneously, they could possibly include each others documents in their print batch. It is unlikely that this will ever happen since the checkboxes are cleared after each job but I wanted to try to prevent it anyway. For now I'll leave it with it working and go with that. Thanks again.

John
 
Boyd,

Thanks for your help. The problem, just as I thought, was with using the EmpID field as a filter in the query. Without it it works fine. My only hesistation with this and the reason I didn't go this route in the first place is that there are many front ends and if two people are doing a mass print simultaneously, they could possibly include each others documents in their print batch. It is unlikely that this will ever happen since the checkboxes are cleared after each job but I wanted to try to prevent it anyway. For now I'll leave it with it working and go with that. Thanks again.

John

John,

It is definitely possible to filter by employee/user also.

If you want to filter by employee, then you will need to also store the employee info with the print flag in the table. I do this so that only one user can print a record at a time and also so other employees don't print each others data. You can also use a temp table in the front end to hold the selected records.
 
Last edited:
Have you considered the possibility of copying the table to a temorary table on the FE so each user can select their own choice of records to print.
 
Yes actually I had thought about creating a 'print table' of sorts for that purpose but was trying to keep the db as streamlined as possible. If the way I have it now ever causes a problem, then I'll probably go that route. Thanks again for everyone's help.
 

Users who are viewing this thread

Back
Top Bottom