Print Form with selected Records?

G

Guest

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
 
R

Rick B

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
 

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