If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Print Form with selected Records?
I have a form showing customer details based on the user selecting the
customer name from a combo box. I then have a subform (in continuous view) which displays any items that are un-shipped for that customer along with check boxes for the user to select/de-select which items are to be shipped today. Once the user makes these selections, I would like to print out the form showing only the items that are checked. This will be like a packing slip included in their shipment showing what items are included. Is there a way to print the form with only the selected items or do I have to somehow put this into a report? I've added a print command button to the form, but don't know what kind of code to use to get only the selected records. Any help greatly appreciated. Thanks |
#2
|
|||
|
|||
In short, you will need to create a report to print the document. That
report will ned to be based on a query that pulls only "checked" records in the secondary table. When you run that query, I would put criteria in so that only the customer in the open form would be pulled to the query. To do that, build your query with both tables in the query window. Pull the Customer number from the main table and put criteria under it like... =Forms![MyFormName]![MyCustomerFieldName] Then include all the fields you need from that table to print on your packing slip. Pull all the fields from the details table that you will need to print on the packing slip. Include that "checkbox" field that you mentioned. Under that field, put criteria so only ckecked items are pulled. Save this query and build your report based on it. Place a button on your form and use the wizard to have it open the report we just mentioned. I would recomend that you also add a button to "uncheck" all the selected items. After printing your packing slip, either run code automatically to uncheck everything, or tie that code to a button tha the user must click. I know this is not terrible specific, but you were not getting other responses. Play with this and post back if you encounter specific issues. Rick B "rg32" wrote in message ... I have a form showing customer details based on the user selecting the customer name from a combo box. I then have a subform (in continuous view) which displays any items that are un-shipped for that customer along with check boxes for the user to select/de-select which items are to be shipped today. Once the user makes these selections, I would like to print out the form showing only the items that are checked. This will be like a packing slip included in their shipment showing what items are included. Is there a way to print the form with only the selected items or do I have to somehow put this into a report? I've added a print command button to the form, but don't know what kind of code to use to get only the selected records. Any help greatly appreciated. Thanks |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
from a FORM print a label report 3 labels per sheet for CURRENT re | babs | Setting Up & Running Reports | 7 | February 6th, 2005 06:38 PM |
Dates in a listbox connected to a form... | RusCat | Using Forms | 13 | November 25th, 2004 02:31 AM |
How do I print the details view | David | Running & Setting Up Queries | 5 | August 28th, 2004 12:17 AM |
dlookup | miaplacidus | Using Forms | 9 | August 5th, 2004 09:16 PM |